drop a pushed commit code example
Example 1: revert last push to server
git reset --hard HEAD@{1}
git push -f
Example 2: git delete last commit in remote
$git rebase -i HEAD~2
git reset --hard HEAD@{1}
git push -f
$git rebase -i HEAD~2