Last active
August 29, 2015 14:23
-
-
Save vasanthk/ea4b32769689c76aa4a3 to your computer and use it in GitHub Desktop.
Squash PR commits into a single commit
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
git fetch upstream | |
git checkout mybranch | |
git merge upstream/master | |
# if necessary, resolve conflicts and git commit | |
# ... | |
git reset --soft upstream/master | |
git commit -am 'Some cool description for a single commit' | |
git push -f | |
Note that it's super important that you merge before resetting, and that the argument is the same master branch. | |
Otherwise you risk messing up your local history. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment