How to squash all git commits into one? September 9, 2022 by Tarik As of git 1.6.2, you can use git rebase --root -i For each commit except the first, change pick to squash.