Created
January 18, 2024 10:18
-
-
Save salyh/d63a4828364f3313837f12939a3b57a4 to your computer and use it in GitHub Desktop.
git: squash all commits in the current 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
git reset --soft HEAD~$(( $(git rev-list --count $(git rev-parse --abbrev-ref HEAD)) -1 )) && git commit -m "Initial commit" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment