how to remove pushed commits in git code example
Example 1: revert last push to server
git reset --hard HEAD@{1}
git push -f
Example 2: delete a pushed commit
# delete the last commit
$git reset –hard HEAD~
git reset --hard HEAD@{1}
git push -f
# delete the last commit
$git reset –hard HEAD~