how to reset git branch to a certain commit.

Shell
git revert --no-commit 0766c053..HEAD
git commit

Source

Also in Shell: