revert changes pushed to branch code example
Example 1: revert last push to server
git reset --hard HEAD@{1}
git push -f
Example 2: git how to undo a pushed commit
git revert <commit_hash>
git reset --hard HEAD@{1}
git push -f
git revert <commit_hash>