how to revert last commit in git bash code example Example: revert commit git git revert <commit hash>