How can I squash my last X commits together into one commit using Git?
If you're working with GitLab, you can just click the Squash option in the Merge Request as shown below. The commit message will be the title of the Merge Request.