Skip to content

Instantly share code, notes, and snippets.

@Hiteshm01
Created February 8, 2015 17:43
Show Gist options
  • Save Hiteshm01/82e4a981afb6af0b8903 to your computer and use it in GitHub Desktop.
Save Hiteshm01/82e4a981afb6af0b8903 to your computer and use it in GitHub Desktop.
To create patch files of git branches
git diff origin/master > /tmp/patch.diff # replace origin/master with branch to compare with
# Move this patch file to new server via scp.
patch -p1 < /tmp/patch.diff # Assuming same location on remote machine.
# Or alternatively
# git apply -v /tmp/patch.diff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment