Created
May 9, 2018 14:19
-
-
Save defilerc/a5d5a56240ede95bed95b0f176d53fa5 to your computer and use it in GitHub Desktop.
git: create patch between branches and apply
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
# checkout branch with changes | |
# --stdout used to produce 1 diff file, instead of n, where n # of commits. | |
git format-patch [branch_to_compare_to] --stdout > all.patch | |
# checkout to new branch. apply patch created | |
git apply all.patch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment