how to reset commits git before push code example Example: cancel a commit not pushed git reset --soft HEAD~