Sometimes, when I was too stupid to change the
git configuration and pushed a commit with the wrong credentials again, I need to revert the most recent commit completely. And every time I have to do this, I need to search for the correct command.
So, for a short note: with the command below the last commit will be erased completely. Unlike a
rebase, the commit can't be found in any branch from now on. More information can be found in this great post on Stack Overflow.
Just great for all kind of mistakes. ;)