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。

 

posted @ 2018-07-02 20:30  shyroke、  阅读(15365)  评论(0)    收藏  举报
作者:shyroke 博客地址:http://www.cnblogs.com/shyroke/ 转载注明来源~