reset branch to some other commit locally code example Example: how to revert branch to old commit git revert --no-commit 0766c053..HEAD git commit