Created
June 6, 2014 16:51
-
-
Save drautb/3645aa0bef2301b961f5 to your computer and use it in GitHub Desktop.
Patching with 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 a patch for a single commit | |
git format-patch -1 HEAD | |
# Or | |
git format-patch -1 <sha> | |
# Applying the patch | |
git apply --stat file.patch # show stats. | |
git apply --check file.patch # check for error before applying. | |
git am < file.patch # apply the patch finally. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment