git returning to a comit code example Example 1: revert commit git git revert <commit hash> Example 2: how discharge changes e recover last commit git git reset HEAD --hard