gitlab 强制提交

版权申明:未经允许请勿转载。转载前请先联系作者([email protected]

类似文章

之前在自己的电脑上强制提交了不少次。然后刚才发现之前部署的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的设置就好了。

gitlab 强制提交_第1张图片

gitlab 强制提交_第2张图片

PS:
自己是管理员(完全掌控git)就可以这样做
其他情况,还是老老实实merge/rebase吧 :)

你可能感兴趣的:(GIT/SVN)