how to remove the commit which is not pushed 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