From: Junio C Hamano Date: Thu, 11 Jul 2013 16:01:15 GMT Subject: Re: Priming git clone with a local repo? Message-ID: <7vtxk1rsqc.fsf@alter.siamese.dyndns.org> In-Reply-To: <20130711093532.GA28255@inner.h.apk.li> Andreas Krey writes: > I'm wondering if there is (or will be) a way of doing almost > > git clone --reference localrepo host:canonrep > > Basically, I don't want the implications of --reference but still the > performance advantages of reusing local objects/pack files. I think the standard operating procedure for that is to still clone with the "--reference" option first, and then do "repack -a -d" in the resulting clone (note the lack of "-l" option in "repack"). After that repack, you should be able to discard the alternates file. $ git clone --reference ../there otherhost:repo ours.git $ cd ours.git $ git repack -a -d ;# no "-l"!!! $ mv .git/objects/info/alternates .git/objects/info/alter-nates $ git fsck $ rm .git/objects/info/alter-nates