Created
December 19, 2011 22:13
-
-
Save notch8/1499151 to your computer and use it in GitHub Desktop.
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
branch = "acme" | |
# Make a patch file for each branch | |
.git checkout #{branch} | |
.git checkout master | |
.git diff --binary master #{branch} > #{branch}.patch | |
# Make a new branch | |
.git branch -D #{branch} | |
.git checkout -b #{branch} | |
# Apply the patch | |
.git apply #{branch}.patch | |
.git add app* | |
.git add lib* | |
.git commit -am "Re-applying all changes to previous branch so we can rebase on master in the future" | |
.git push --force origin #{branch} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment