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

backup or mirror a repository

From
Dan Farina <drfarina@gmail.com>
Date
Sep 27, 2007, 19:35 UTC
Message-ID
<1190921742.2263.17.camel@Tenacity>
Hello list,

I have been poking around on IRC and gmane, but haven't yet seen a solution to my problem:

What I really want is something semantically identical to a recursive copy of my entire git repository on one machine sent to another machine. Right now I can't simply use "rsync -ar --delete ..." because the pack changes names, thus fooling rsync and sending a bunch of bits over the network.

I saw git-mirror on gmane and asked around in IRC, but the former seems to have died sometime last November and the latter told me I'd probably have to write some glue to process git show-ref and git ls-remote. This seems viable, but suboptimal. Another user chimed in that they also had the same use case as myself.

fdr

(Justifications: I am super paranoid, so I want to push my local branches to another disk to be safe, but then they proliferate over time since deleted local branches are not also deleted on the target repository. I also want to work on multiple machines seamlessly, and as such doing a bunch of "git checkout -r ..." when I need to change branches is also suboptimal. As I said, I can get what I want by simply using rsync, so this is entirely about efficiency by exploiting git's structure)

Next: Johannes Schindelin
Message 1 of 9 in “backup or mirror a repository”
  1. Dan FarinaSep 27, 2007
  2. Johannes SchindelinSep 27, 2007
  3. Dan FarinaSep 28, 2007
  4. Johannes SchindelinSep 28, 2007
  5. Dan FarinaSep 28, 2007
  6. Junio C HamanoSep 28, 2007
  7. Dan FarinaSep 28, 2007
  8. Dmitry PotapovOct 18, 2007
  9. Johannes SchindelinOct 30, 2007

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.