How can I squash my last X commits together into one commit using Git?
Use the following commands to squash last n commits into single commit
git reset -- soft HEAD~n && git commit