rever t commit git code example Example 1: git revert commit git revert <commit hash> Example 2: get back some commits git git revert {commit_id}'