push to origin/master was rejected错误解决方案

Posted longronglang

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了push to origin/master was rejected错误解决方案相关的知识,希望对你有一定的参考价值。

idea中,发布项目到OSChina的Git中,当时按照这样的流程添加Git,然后push,提示:push to origin/master war rejected"。

解决方案如下:

1.切换到自己项目所在的目录,右键选择GIT BASH Here

2.在terminl窗口中依次输入命令:

git pull

git pull origin master

git pull origin master --allow-unrelated-histories

3.在idea中重新push自己的项目,成功!!!

以上是关于push to origin/master was rejected错误解决方案的主要内容,如果未能解决你的问题,请参考以下文章

git丨Push rejected: Push to origin/master was rejected

Push rejected: Push to origin/master was rejected

Push rejected: Push master to origin/master was rejected by remote(IDEAMACGIT)

Push rejected: Push master to origin/master was rejected /failed to push some refs to /git did not

git问题--Push rejected: Push to origin/master was rejected

idea push 时 出现如下错误 Push to origin/master was rejected