问题描述
我们有一个自托管的Gitlab实例.
We have a self-hosted Gitlab instance.
我使用了BFG-Repo-Cleaner,一切顺利,但是当我尝试进行更改时,我得到了:
I used BFG-Repo-Cleaner and everything went well, but when I try to push changes I get this:
远程:GitLab:不允许将推送代码强制到该项目上受保护的分支.
remote: GitLab: You are not allowed to force push code to a protected branch on this project.
P.S.我是该项目的所有者.早些时候,我做了这个项目的分支,并且在那里进行更改没有问题.
P.S. I'm owner of the project.Earlier I made fork of this project and I had no problems pushing changes there.
推荐答案
我假设您知道自己在做什么,并且您真的想强制执行推送. GitLab默认情况下不允许强制推送到master分支.您可以删除该保护.单击项目中的齿轮图标,然后选择Protected branches
.然后单击master分支的Unprotect
按钮.这样,强制推送就会起作用.
I assume you know what you are doing and you really want to force a push. GitLab disallows a forced push to the master branch by default. You can remove that protection. Click the cogwheel icon in your project and select Protected branches
. Then click the Unprotect
button for the master branch. The forced push will work then.
这篇关于BFG Repo-Cleaner后无法推动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!