delete commit not pushed git code example
Example 1: cancel a commit not pushed
git reset --soft HEAD~
Example 2: delete a pushed commit
$git log --pretty=oneline --abbrev-commit
git reset --soft HEAD~
$git log --pretty=oneline --abbrev-commit