我正在尝试推送到存储库的主分支,但我未能这样做,因为它受到保护。
我尝试查看项目设置,但没有看到任何受保护分支的选项。我能看到的唯一选择是会员。
remote: GitLab: You are not allowed to push code to protected branches on this project.
To [email protected] /cdn-cgi/l/email-protection:cmd/release.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected] /cdn-cgi/l/email-protection:cmd/release.git'
我的仓库只有一个分支,到目前为止还没有任何内容。
我确实看到了其他存储库的受保护分支选项,但没有看到此特定存储库的受保护分支选项。
这是一个新的存储库,没有内容,只有默认分支。
我有master
允许。
不幸的是,我无法以某种方式在这里上传图像。
请建议如何将代码推送到主分支。
2018年12月17日
1. git push
:“错误:无法将一些参考推送到”
git push -f
:“远程拒绝”
2、分支机构处于受保护状态,不能强制营业。
Gitlab - Repository - Branches
3.暂时解除分支保护。
Gitlab - Settings - Repository - Protected Branches - Unprotect
4.再次尝试推送
git push -f
5.可加保护
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)