Git git push origin报错解决方法: ! [remote rejected] master -> master (pre-receive hook declined)
git master 分支回滚到某次提交点后,强推远程master报错:
╰─$ git push -f origin master 1 ↵
Total 0 (delta 0), reused 0 (delta 0)
remote: GitLab: You are not allowed to force push code to a protected branch on this project.
To https://gitlab.xxxx.cn/xxx/xxx/xxx.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://gitlab.xxxx.cn/xxx/xxx/xxx.git'
解决办法:
取消 master 分支的 protected
猜你喜欢:暂无回复。