I would like to squash all commits between 2 commit id's. Commit id 08f68388387e81aaff8e8cdfa619b6c23adef39d
is the first commit I made on the branch, and I would like to squash all commits till and including d3ccda596adf33f38a6ad3f9bdf63a43713b6343
which is like the 23rd commit on the branch (of 30).
git rebase -i HEAD~30
. Then replace the word pick in front of all commits with the wordfixup
. This will squash the commit into the previous commit while retaining only the commit message of the first commitgit rebase -i --root
, given that you want to start playing with revisions from the very first one.