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