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