Let machine M be the Main machine with the repo, and A the Auxiliary machine which wants to help out.
First time setup
- Machine M creates bundle with complete repo:
git bundle create repo.bundle HEAD master
- M sends
- A clones repo from bundle:
git clone repo.bundle repo
A sends commits to M
- A checks with
git log --oneline master ^origin/master
that the correct commits are shown that are added. 2. A puts them in a bundle with
git bundle create commits.bundle master ^origin/master
Note that both
origin/master could be replaced with commit refs.
- A sends bundle to M, M optionally checks bundle with
git bundle verify commits.bundle
- M pulls commits to new branch
git pull commits.bundle master:other-master
- M could merge the branch.
M could add the bundle file as a remote, if the filename is always the same.
git remote add bundle commits.bundle where
bundle is the name of the remote. Beware that the path
commits.bundle is relative to the repository top level!
M can then
git pull bundle.