Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rudyhuynh/9c8020cf231f9b18713177ec1c5c349b to your computer and use it in GitHub Desktop.
Save rudyhuynh/9c8020cf231f9b18713177ec1c5c349b to your computer and use it in GitHub Desktop.

Instruction to send a git commit to other machine when git server is down

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:

  1. At your machine, run git format-patch master --> 0001-mybranch.patch generated.
  2. Send 0001-mybranch.patch to your friend, at your friend's machine run git apply 0001-mybranch.patch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment