之前在自己的电脑上强制提交了不少次。然后刚才发现之前部署的gitlab强制提交不了。
git push -f origin master
$ git push -f origin master 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 http://119.23.72.7/sunlong_v5/note-library.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'http://119.23.72.7/sunlong_v5/note-library.git'
修改下gitlab的设置就好了。
本文来自博客园,作者:孙龙-程序员,转载请注明原文链接:https://www.cnblogs.com/sunlong88/p/14179540.html