git reset [commit hash]
However, this only allows the local branch to be rolled back to the commit, and the remote branch is in its original place.
You can do this: create a new branch on the commit you want to roll back, then git checkout [the branch], then delete the original branch, git branch-d [old branch] can delete the local old branch, similarly, the remote branch or old state, you can git push Origin: [Old branch], delete the old branch of the remote, so that the information you need to rollback the commit is completely wiped out both locally and remotely (be careful to make sure you don't really want the information). And you need to roll back the information before the commit is all saved, but the branch name for a change, you can also rename the branch back. At this point the remote new branch does not exist, and after you change the commit and push, the remote is also synchronized with the local.
How to use Git to roll back a version to a commit point in a branch