Git How-To: Squash commits in one line

Adding this here in case I need to refer to it in the future.

git reset --soft HEAD~3 && git commit

Where ~3 means squashing last 3 commits into one.