首先,找到要回退的版本号

git log --pretty=oneline

执行回退命令

git reset --hard 版本号

push到服务器

git push -f origin master

如果是gitlab,可能需要把master分支的保护模式去掉