Created
March 16, 2020 14:48
-
-
Save InBrewJ/2bfa2fec1c756a15ddd666637d0d1993 to your computer and use it in GitHub Desktop.
How to convert a PR with already squashed 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
# WARNING: THIS WILL GET RID OF THE COMMITS ON YOUR FEATURE BRANCH TOO! | |
# Original steps | |
# 1. Start with a clean version branch. | |
# 2. git reset master | |
# 3. git add . (notice trailing dot in there) | |
# 4. git commit -m "A really meaningful commit message" | |
# 5. git push --force | |
git reset master && \ | |
git add . && \ | |
git commit -am "$1" && \ | |
git push --force |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment