How can I squash my last X commits together into one commit using Git?
If you don't care about the commit messages of the in-between commits, you can use
git reset --mixed git commit -a --amend