Last active
March 30, 2023 10:19
-
-
Save moskrc/d79adbe33bf7fa90adbdaa6db928f2bd to your computer and use it in GitHub Desktop.
Squash all commits in a branch
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
git switch yourBranch | |
git reset --soft $(git merge-base main HEAD) | |
git commit -m "one commit on yourBranch" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment