Git development
 help / color / mirror / Atom feed
* How to stop sharing objects between repositories
@ 2009-08-16  0:04 Jon Jensen
  2009-08-16  8:43 ` Johannes Schindelin
  0 siblings, 1 reply; 18+ messages in thread
From: Jon Jensen @ 2009-08-16  0:04 UTC (permalink / raw)
  To: git

Hello.

Situation: I used "git clone -s" to share objects between repositories. 
That creates .git/objects/info/alternates, which points to the other 
repository. Later I need to remove the dependency and make the dependent 
repository self-sufficient, i.e. it should have all the objects internal 
to itself.

I've looked around for a way to do that but haven't found either tools or 
instructions.

I came up with this manual way, copying over the unique remote objects and 
then removing the alternate repository pointer:

(cd /path/to/alternate/repo.git/objects && tar cp .) | (cd .git/objects && tar xvpk)
# some objects will already exist and be skipped, leading to an error on exit, which is fine
rm .git/objects/info/alternates
# or if there's more than one and you're only removing one, edit the alternates file and remove only that pointer

(With GNU tar -C the copy is a little simpler.)

I posted this to the wiki:

http://git.or.cz/gitwiki/GitFaq#Howtostopsharingobjectsbetweenrepositories.3F

If there's a better or built-in way to do this with Git tools, I'd like to 
learn it, and I'd be happy to update the wiki accordingly.

Thanks,
Jon

-- 
Jon Jensen
End Point Corporation
http://www.endpoint.com/

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2009-08-17  7:50 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-16  0:04 How to stop sharing objects between repositories Jon Jensen
2009-08-16  8:43 ` Johannes Schindelin
2009-08-16 12:28   ` Jeff King
2009-08-16 12:30     ` Johannes Schindelin
2009-08-16 13:54       ` Daniel Villeneuve
2009-08-16 13:57         ` Johannes Schindelin
2009-08-16 13:57       ` Jeff King
2009-08-16 19:16         ` Junio C Hamano
2009-08-17  2:21           ` Mike Galbraith
2009-08-17  6:48             ` Jeff King
2009-08-17  7:12               ` Mike Galbraith
2009-08-17  7:24               ` Junio C Hamano
2009-08-17  7:25                 ` Jeff King
2009-08-17  7:35                   ` Junio C Hamano
2009-08-17  7:50                     ` Jeff King
2009-08-17  6:19           ` Jeff King
2009-08-17  6:32             ` Jeff King
2009-08-17  6:31           ` Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox