Re: Sharing repositories later on
- From
Linus Torvalds <torvalds@osdl.org>
- Date
- Jul 12, 2006, 15:47 UTC
- Message-ID
- <Pine.LNX.4.64.0607120843570.5623@g5.osdl.org>
- In-Reply-To
- <20060712132800.GA7328@harddisk-recovery.com>
On Wed, 12 Jul 2006, Erik Mouw wrote:
> > I just learned out about "git clone -s" to share objects between > repositories. How do I use that with already existing repositories?
Do
echo "/source/git/project/.git/objects/" > .git/objects/info/alternates
and then follow it up with
git repack -a -d -l
where the "-l" means that it will only put _local_ objects in the pack-file (strictly speaking, it will put any loose objects from the alternate tree too, so you'll have a fully packed archive, but it won't duplicate objects that are already packed in the alternate tree).
Linus