how to reset head to a specific local commit code example Example: how to reset git branch to a certain commit. git revert --no-commit 0766c053..HEAD git commit