Git上传项目到码云提示Push rejected: Push to origin/master was rejected

Push rejected: Push to origin/master was rejected 

直接解释:推拒绝:推送到起源/主人被拒绝 

问题出现的原因

从码云上克隆下来的项目,进行修改之后上传失败,原因是项目中有和和历史不符的东西 。

解决办法

找到项目的文件夹鼠标右键git Bash Here然后直接下面两行命令解决问题

$ git pull origin master –allow-unrelated-histories 
$ git push -u origin master -f

猜你喜欢

转载自blog.csdn.net/weixin_41499217/article/details/82985582
今日推荐