Last active
December 18, 2015 18:39
-
-
Save duellj/5827432 to your computer and use it in GitHub Desktop.
Drupal.org patch rerolls
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 branch at a date near patch creation | |
git co -b issue-x `git log -1 --before=[date of patch, e.g. 6/1/2013] --format=format:%h` | |
# Apply patch and commit | |
curl [patch url] | patch -p1 | |
git add -A . | |
git ci -m 'Patch from #comment' | |
# Rebase to current 8.x HEAD | |
git rebase 8.x | |
# Fix any merge conflicts during rebase | |
# Diff against 8.x to create new patch | |
git diff 8.x > issue-[issue #]-[comment #].patch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usually patches apply fine, given that you are checking out a branch neat the time the patch was created. But if the patch does fail, then fixing the problems should be a lot easier then if you're trying to apply it on HEAD.