git push 出现 you are not allowed to upload merges 错误提示

Posted princesong

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了git push 出现 you are not allowed to upload merges 错误提示相关的知识,希望对你有一定的参考价值。

解决方法:敲git rebase 然后按提示执行就行了,如果rebase 发生冲突的话,则修改,修改完后git add -u filename,然后git rebase --continue ,直到没有冲突为止。不需要commit 。最后再上code(参考链接 参考链接2
出现问题的原因:在本地分支ahead 远程分支commit 不止一个的 时候,即是出现了分叉,在这种情况下使用了git pull 更新代码之后去git push 就会产生如此情况
解决原理: 使用rebase,”放弃“本地补丁,实则是保存起来然后加在远程分支的最前面
rebase解析链接
附上一个含有比较多的git 错误解析的博文:点击打开链接
————————————————
版权声明:本文为CSDN博主「muximuxi525」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/muxidreamtohit/article/details/43408127

以上是关于git push 出现 you are not allowed to upload merges 错误提示的主要内容,如果未能解决你的问题,请参考以下文章

git合并分支成功,但是push失败(remote: GitLab: You are not allowed to push code to protected branches on this pr

IDEA使用Git提交代码remote: GitLab: You are not allowed to push code to protected branches on this project(

GitLab: You are not allowed to push code to this project.

GitLab: You are not allowed to push code to this project.

remote: GitLab: You are not allowed to push code to protected branches on this project.

remote: GitLab:You are not allowed to push code to protected branches on this project