Re: rsync a *bunch* of git repos
- From
Sergio <sergio.callegari@gmail.com>
- Date
- Jan 11, 2012, 13:22 UTC
- Message-ID
- <loom.20120111T141805-791@post.gmane.org>
- In-Reply-To
- <7v39bn9onl.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster <at> pobox.com> writes:
Show 20 quoted lines
> > "Philip Oakley" <philipoakley <at> iee.org> writes: > > > I think there is an exception for certain git submodule setups with > > local repos, where the gitdir link is hard coded to the absolute > > machine path. There has been some discussion on the list recently > > about trying to cover this case. > > But if you read the original post carefully, all repositories involved are > under /home before the transition, and they will move to the exact same > place under /home anyway, so I do not think the discussion you have in > mind would apply to this case. > > The only thing that is needed after the move would be to run > > git update-index --refresh > > in all of the repositories, I think. > >
I keep a desktop and a laptop in sync with unison (which uses rsync) and I confirm that git is entirely happy about that.
the git update-index --refresh is necessary, otherwise git status will incorrectly report dirty trees.
I wonder if it would not make sense to incorporate the update-index --refresh in the git status command.
As an aside: git works fine when repos are transferred with rsync, but git packs are not rsync friendly nor friendly with backup strategies using binary deltas.