IDEA使用Git出现push to origin/master was rejected错误解决方案

Posted shyroke

tags:

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

  • 在IDEA中配置码云的URL,如下图

技术分享图片

 

技术分享图片

 

  • 切换到自己项目所在的目录,右键选择GIT BASH Here
  • 在terminl窗口中依次输入命令:
  • git pull
  • git pull origin master
  • git pull origin master --allow-unrelated-histories
  • 在idea中重新push自己的项目,即可成功push。

 

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

IDEA Git 上传代码时遇到 Push rejected: Push to origin/master was rejected

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

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

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

git push origin master出错:error: failed to push some refs to

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