how to delete a local commit in git code example
Example 1: git revert last commit unpushed
git reset --soft HEAD~1
Example 2: git remove commit
# Removes latest commit from the stash, KEEPS changes
git reset --soft HEAD~
# Removes latest commit from the stash, DELETES changes
git reset --hard HEAD~