If you want your current branch (e.g., main) to go back to that commit:
git fetch origin
git checkout main
git reset --hard that-commit-hash
If you want your current branch (e.g., main) to go back to that commit:
git fetch origin
git checkout main
git reset --hard that-commit-hash