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

Mirroring for offline use - best practices?

From
JDJoachim Durchholz <jo@durchholz.org>
Date
Jul 12, 2017, 10:47 UTC
Message-ID
<81052ff7-cece-400d-1742-e13693fae7e3@durchholz.org>
Hi all,

I'm pretty sure this is a FAQ, but articles I found on the Internet were either mere "recipes" (i.e. tell you how, but don't explain why), or bogged down in so many details that I was never sure how to proceed from there.

Basic situation:

There's a master repository (Github or corporate or whatever), and I want to set up a local mirror so that I can create clones without having to access the original upstream. I'd like to set the mirror up so that creating a clone from it will automatically set up things to "just work": I.e. branches will track the mirror, not upstream, possibly other settings that I'm not aware of.

I gather that local clones are fast because hardlinked - is that correct? Is that correct on Windows? (I can't easily avoid Windows.)

Ramification 1:

I'm not sure how best to prepare patches for push-to-upstream. Is there value in collecting them locally into a push-to-upstream repo, or is it better to just push from each local clone individually?

Ramification 2:

Some of the repos I work with use submodules. Sometimes they use submodules that I'm not aware of. Or a submodule was used historically, and git bisect breaks/misbehaves because it can't get the submodule in offline mode. Is there a way to get these, without writing a script that recurses through all versions of .gitmodules? I'm seeing the --recurse-submodules option for git fetch, so this might (or might not) be the Right Thing.

Any thoughts welcome, thanks!

Regards, Jo

Next: Stefan Beller
Message 1 of 3 in “Mirroring for offline use - best practices?”
  1. Joachim DurchholzJul 12, 2017
  2. Stefan BellerJul 12, 2017
  3. Joachim DurchholzJul 12, 2017

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.