Squash commits in git

Squash last 3 commits into 1:

git rebase -i HEAD~3

and then pick the first one, and squash the others.