Revert a Git repository to a previous commit
git reset --hard [previous Commit SHA id here]
git push origin [branch Name] -f
It will remove your previous Git commit. If you want to keep your changes, you can also use:
git reset --soft [previous Commit SHA id here]