To squash the last 10 commits into 1 single commit: <!-- language: shell --> git reset --soft HEAD~10 && git commit -m "squashed commit" If you also want to update the remote branch with the squashed commit: git push -f