Assume you are at a branch, which has 1 commit ahead of master
.
You want to send that commit to your friend's machine while the git server is down.
Solution:
- At your machine, run
git format-patch master
-->0001-mybranch.patch
generated. - Send
0001-mybranch.patch
to your friend, at your friend's machine rungit apply 0001-mybranch.patch