Incremental sync of 2 repositories on different networks

In my setup, I have a Git repository that I work on. On another network (with no access to my main network), I have another Git repository that is read only that I want to keep synced up with the main repository. I’d like to do this occasionally to make sure that the closed repository is up to date with the main. I would also like to avoid having to send a full clone of the repository every time I want to update the closed repository.

Previously, I would use Subversion’s svnadmin dump and restore commands to do this incremental updating of the closed repository, but unsure how to do it with Git?

  • Git get old submodule
  • Create a tag in GitHub repository
  • Problem installing MSysGit (libiconv-2.dll is missing…)
  • Why would git cherry-pick produce fewer conflicts than git rebase?
  • fatal: Not a git repository when installing mod_python
  • Executing 'git pull' from SSH in Dreamhost to GitHub without password
  • Are there Git commands, or ideally a Git UI, that allow me to do this?

    Is Git patching the preferred way to do this?

  • Nested git repositories?
  • How do I deal with corrupted git object files?
  • Checkout subfolder in git
  • Composer autoload-dev does not work
  • Jenkins Git UnknownHostKey
  • TLS error while cloning from git repository
  • One Solution collect form web for “Incremental sync of 2 repositories on different networks”

    I suspect in your case I would simply occasionally connect my laptop to the ‘other’ network and push branches from my local clone. However, you might want to look into git bundle which basically allows push/pull via sneaker-net. You can create a bundle file containing a set of commits (eg: git bundle create update.bundle last-update-tag HEAD) then take this bundle to your non-networked device and you can pull it (git pull update.bundle). Quite useful for USB stick transfers.

    Git Baby is a git and github fan, let's start git clone.