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).
Asked
Active
Viewed 20 times
0

Peter Boomsma
- 8,851
- 16
- 93
- 185
-
1I usually do this with an interactive rebase like this: `git rebase -i HEAD~30`. Then replace the word pick in front of all commits with the word `fixup`. This will squash the commit into the previous commit while retaining only the commit message of the first commit – PiFanatic Aug 09 '22 at 13:39
-
2or `git rebase -i --root`, given that you want to start playing with revisions from the very first one. – eftshift0 Aug 09 '22 at 13:58
-
https://stackoverflow.com/search?q=%5Bgit%5D+combine+multiple+commits – phd Aug 09 '22 at 13:59