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

需求一:Push rejected: Push to origin/master was rejected
1.在terminl窗口中依次输入命令:
git pull
git pull origin master
git pull origin master --allow-unrelated-histories


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


2.没有权限,添加权限重试即可

 

3.另外一个原因  选择项目---git---选中当前的分支---pull   然后重新push


需求二:修改项目的url
1.VCS --> Remotes --> 选择之前的URL 修改为现在的URL
2.切换到项目.git文件夹下打开conf文件找到[remote "origin"]
将url修改为现在的URL地址

你可能感兴趣的:(idea git Push rejected: Push to origin/master was rejected)