Created
February 9, 2021 14:48
-
-
Save jomurgel/9366a93fde97466cf0f539ec13388ade to your computer and use it in GitHub Desktop.
Create and apply patch from branch diff
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
# Compare the changes against main. | |
git diff main BRANCH_W_CHANGES_NAME > ./temp_patch | |
# Checkout to a new branch and apply the patch. | |
git checkout NEW_BRANCH_NAME && git apply ./temp_patch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment