delete local commit not pushed git code example Example: cancel a commit not pushed git reset --soft HEAD~