Answers for "git squash commits and change message"

3

squash commit history git

# THIS TURNS YOUR WHOLE COMMIT HISTORY INTO ONE SINGLE COMMIT!
# BE CAREFUL!

git rebase --root -i

# In your editor, for each commit except the top, change `pick` to `squash`
Posted by: Guest on August-23-2020
0

git squash commit

git rebase -i HEAD~5
# As the commit on line 1 is HEAD, in most cases you would leave this as 
# pick. You cannot use squash or fixup as there is no other commit to 
# squash the commit into.
Posted by: Guest on January-04-2022

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language