Last active
August 29, 2015 14:20
-
-
Save nareix/c40d43e8052cacf658aa to your computer and use it in GitHub Desktop.
Patching with git diff
This file contains 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
# Source: http://tamsler.blogspot.com/2009/02/patching-with-git-diff.html | |
# If you want to create a patch file via "git diff" | |
# that can be applied using "patch -p0 < patchfile" use the following command: | |
git diff --no-prefix > patchfile | |
# then apply the patch | |
patch -p0 < patchfile | |
# If you have an existing "git diff" patch file that was created without the "--no-prefix" option, | |
# you can apply that patch via: | |
patch -p1 < patchfile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment