how to go to past commit in git bash code example
Example 1: revert git commit
git revert <the_commit_hash>
Example 2: git set head to commit
# Set a new HEAD to a branch
# Note that commit can be a commit hash or tag or another branch
git reset --hard $COMMIT