how to stash last committed which was not pushed in git code example Example: cancel a commit not pushed git reset --soft HEAD~