Git command to reset the head from the shell, deletes last commit that was not pushed to origin.
# Delete the most recent commit, destroying the work you've done:
git reset --hard HEAD^
# OR
git reset --hard HEAD~1
# Delete the most recent commit, keeping the work you've done:
git reset --soft HEAD~1