git squash

Squash multiple commits into a single commit. Part of git-extras. More information: https://github.com/tj/git-extras/blob/master/Commands.md#git-squash.

git squash source_branch

git squash commit

git squash HEAD~n "message"

git squash --squash-msg HEAD~n