Re: How to stop sharing objects between repositories
- From
- Daniel Villeneuve <daniel2villeneuve@videotron.ca>
- Date
- Aug 16, 2009, 13:54 UTC
- Message-ID
- <4A880F89.3060702@videotron.ca>
- In-Reply-To
- <alpine.DEB.1.00.0908161429590.8306@pacific.mpi-cbg.de>
Johannes Schindelin wrote:
> Hmm. I really would like a documentation patch, then. > >
As another way to do it, I've used something along the lines from
http://article.gmane.org/gmane.comp.version-control.git/62062
namely:<script> gitdir=$(git rev-parse --git-dir) [ -n "$gitdir" ] || die "cannot find Git directory"
cd "$gitdir" a=objects/info/alternates if [ -f $a ]; then git rev-parse --all HEAD | git pack-objects --revs objects/pack/pack rm $a fi </script>
I was not sure HEAD would be included via --all (e.g. HEAD pointing to a dangling commit), so I added it explicitly.
The reverse operation (enabling sharing for a standalone repository) is
described here
http://git.or.cz/gitwiki/GitFaq#Howtoshareobjectsbetweenexistingrepositories.3F-- Daniel