Last active
August 10, 2017 17:16
-
-
Save robbwagoner/cd7617aa99fcf4243091b7fc4bdf1ea4 to your computer and use it in GitHub Desktop.
Patching in Git
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
# | |
# Create patch from SHA | |
# http://stackoverflow.com/questions/6658313/generate-a-git-patch-for-a-specific-commit | |
# --stdout option is available, too | |
git format-patch -1 <sha> | |
# | |
# Apply Patch | |
# https://ariejan.net/2009/10/26/how-to-create-and-apply-a-patch-with-git/ | |
# --stat option will show what changes are applied by the .patch | |
# if there are rejects, the patch will not proceed. --rej will force to proceed and create .rej files | |
git apply 0001-name-of-patch-file.patch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment