gitlab 强制提交
类似文章之前在自己的电脑上强制提交了不少次。然后刚才发现之前部署的gitlab强制提交不了。git push -f origin master报错Counting objects: 6, done.Delta compression using up to 8 threads.Compressing objects: 100% (6/6), done.Writing ...
文章共275字 · 阅读需要大约1分钟
一键AI生成摘要,助你高效阅读
问答
·
版权申明:未经允许请勿转载。转载前请先联系作者(hello@yeshen.org)
之前在自己的电脑上强制提交了不少次。然后刚才发现之前部署的gitlab强制提交不了。
git push -f origin master
报错
Counting objects: 6, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 1.10 KiB | 0 bytes/s, done.
Total 6 (delta 4), reused 0 (delta 0)
remote: GitLab: You are not allowed to force push code to a protected branch on this project.
To yeshen:yeshen/test.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@yeshen:yeshen/test.git'
修改下gitlab的设置就好了。
PS:
自己是管理员(完全掌控git)就可以这样做
其他情况,还是老老实实merge/rebase吧 :)
更多推荐
已为社区贡献3条内容
所有评论(0)