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?
- Mercurial: Windows client for remote development
- How to exclude south migrations from public repositories?
- Git push to LAN repo stalls or stops without error
- GitHub: How to do case sensitive search for the code in repository?
- Pull single file on server
- Merging in changes from outside a git repository
Are there Git commands, or ideally a Git UI, that allow me to do this?
Is Git patching the preferred way to do this?
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.