Mirroring for offline use - best practices?
- Date: Wed, 12 Jul 2017 12:47:52 +0200
- From: Joachim Durchholz <jo@xxxxxxxxxxxxx>
- Subject: Mirroring for offline use - best practices?
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'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.)
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?
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
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!