how to remove current commit git code example Example: git cancel last commit git reset --soft HEAD~1