revert last remote commit code example Example: git how to undo a pushed commit git revert <commit_hash>