git revert without cli code example Example 1: git revert commit git revert <commit hash> Example 2: how to revert commit in git git checkout <commit hash>