You’ve forgot one file out of your last commit, didn’t ya?

And now you’ve got 2 commits that were supposed to be one. Fear not!

Add this to your Alias section of ~/.gitconfig:


squash = "!f(){ git reset --soft HEAD~${1} && git commit --edit -m\"$(git log --format=%B --reverse HEAD..HEAD@{1})\"; };f"

Now you can simply do a git squash 2 to join these last 2 commits together.