Created
March 20, 2025 15:52
-
-
Save kevinhooke/f9fb36682a1220ce01442f97ad9aedca to your computer and use it in GitHub Desktop.
git squash commits
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
#To squash previous commits to a single commit | |
git rebase -i HEAD~[number of previous commits to squash] | |
#From the interactive list, each of the commits will be listed as 'pick'. Choose one of the commits into which | |
#the others should be merged, leave that as 'pick', and change all the others to 's' or 'squash' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment