This will be a temporary step
got to Settings
> Repository
> Protected branches
and enable allow force push on the branch that you want to revert changes to
git checkout main
bashgit reset --hard <commit>
git log
git push origin <branch> --force