how to delete a commit in git hub code example Example: git cancel last commit git reset --soft HEAD~1