git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.

Previous: Junio C HamanoNext: Neal Kreitzinger
Message 5 of 8 in “rsync a *bunch* of git repos”
  1. JasonJan 10, 2012
  2. Seth RobertsonJan 10, 2012
  3. Philip OakleyJan 10, 2012
  4. Junio C HamanoJan 10, 2012
  5. SergioJan 11, 2012
  6. Neal KreitzingerJan 11, 2012
  7. JasonJan 24, 2012
  8. Andreas T.AuerJan 11, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.