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