git cancel last commit

Shell
git reset --soft HEAD~1$ git reset --soft HEAD~1
$ git reset --soft HEAD~1$ git reset --hard 0ad5a7a6
// use --soft to reset as uncommitted change,
// or --hard to completely remove
Source

Also in Shell: