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。

猜你喜欢

转载自www.cnblogs.com/shyroke/p/9255630.html