-
-
Save Hiteshm01/82e4a981afb6af0b8903 to your computer and use it in GitHub Desktop.
To create patch files of git branches
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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