squash all 100 git commits into one code example Example: git squash last 2 commits git rebase -i HEAD~2