go back to commit number code example Example: how to revert branch to old commit git revert --no-commit 0766c053..HEAD git commit