Last active
February 29, 2020 06:17
-
-
Save tilleps/d79a5213f59d4931c7cfc0e977477b3e to your computer and use it in GitHub Desktop.
Alternative to Git Squash
This file contains hidden or 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
# https://stackoverflow.com/a/3143485/2424549 | |
# create a new branch | |
git checkout -b new_clean_branch | |
# apply all changes | |
git merge original_messy_branch | |
# forget the commits but have the changes staged for commit | |
git reset --soft master | |
git commit -m "Squashed changes from original_messy_branch" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment