Last active
October 6, 2015 06:47
-
-
Save dsci/2953273 to your computer and use it in GitHub Desktop.
creating and applying patches
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
| # First find the commit sha1(s). | |
| git log | |
| # Then, grab the commit sha1(s). | |
| # For a patch of a single commit. | |
| git format-patch -M -C 3cd894a1bc36867d65119b9a490a3813c0d8066a~1..3cd894a1bc36867d65119b9a490a3813c0d8066a | |
| # Before applying, check what will be happen. | |
| git apply --stat <PATCH_NAME>.patch | |
| # Then, check if there will be any trouble. | |
| git apply --check <PATCH_NAME>.patch | |
| # No trouble? Then - apply the changes. | |
| git am --signoff < <PATCH_NAME>.patch |
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 format-patch -M -C 75c1264618ab836076256712929f24436c93587c..HEAD --stdout > <patch_name>.patch |
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 format-patch -M -C c127d7762ba50f5748c2ed650da3df18c59fac30~1..c127d7762ba50f5748c2ed650da3df18c59fac30 -- lib/wordify.cms/extension.rb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment