Created
August 2, 2023 08:43
-
-
Save Abhishek12345679/11bc0536e1b93193e98e18b3c2401f58 to your computer and use it in GitHub Desktop.
rebase messy branch
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
# 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 main | |
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