Revert unpushed commit

Reverts the most recent commit and adds the reverted changes to stage.

Also see my list of Git aliases. You can create an alias for this, e.g. to git revert-unpushed as I did.

$ git reset --soft HEAD~1

Taken from this Stack Overflow answer.