How can I squash my last X commits together into one commit using Git?
I recommend avoiding git reset
when possible -- especially for Git-novices. Unless you really need to automate a process based on a number of commits, there is a less exotic way...
git merge --squash (working branch name)
git commit
The commit message will be prepopulated based on the squash.