git log #找到要回退到的提交点
比如要回退到提交点为:3523aaa33c6b05cbe61be397d4ac2cf518811fc8的代码
git reset --hard 3523aaa33c6b05cbe61be397d4ac2cf518811fc8(也可以只取前8位
3523aaa3)
git push -f (要强制push)
如果master开启分之保护push会报错:You are not allowed to force push code to a protected branch on this project,要关闭分之保护功能:gitlab->setting->Protected branches->Already Protected点击Unprotect