git how to delete commits instead of pushing 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