Push rejected: Push to origin/master was rejected
1、错误日志
23:04 Maven projects need to be imported: Import Changes Enable Auto-Import23:05 4 files committed: 初始化项目23:06 Push rejected: Push to origin/master was rejected23:07 2 files committed: 初始化项目23:07 Push rejected: Push to origin/master was rejected
2、解决方案
1.切换到自己项目所在的目录,右键选择GIT BASH Here
2.在terminl窗口中依次输入命令:
git pullgit pull origin mastergit pull origin master --allow-unrelated-histories
3.在idea中重新push自己的项目,成功!!!
附一张执行的图:
转载地址:https://www.jianshu.com/p/b0fca181fbf7
posted @ 2018-12-02 23:19 niceyoo 阅读(...) 评论(...) 编辑 收藏