how to revert a old commit in git code example
Example 1: git revert to old commit
git reset --hard c14809fa
Example 2: how to go to a previous commit state
# This will detach your HEAD, that is, leave you with no branch checked out:
git checkout 0d1d7fc32
Example 3: git move back one commit
# This will detach your HEAD, that is, leave you with no branch checked out:
git checkout 0d1d7fc32
Example 4: how to revert branch to old commit
git revert --no-commit 0766c053..HEAD
git commit