how to delete a pushed commit in git code example
Example 1: delete a pushed commit
# delete the last commit
$git reset –hard HEAD~
Example 2: git delete last commit in remote
$git rebase -i HEAD~2
# delete the last commit
$git reset –hard HEAD~
$git rebase -i HEAD~2