git how to undo a pushed commit

C++
git reset --soft HEAD~git reset <previous label or sha1>
git commit -am "blabla"
git push -f <remote-name> <branch-name>git revert <commit_hash>

Source

Also in C++: