Git上传项目提示Push rejected: Push to origin/master was rejected解决办法

直接打开你要上传代码的文件夹位置鼠标右键git Bash Here然后直接下面两行命令解决问题

git pull projectname(项目名称) master --allow-unrelated-histories
回车
git push -u projectname(项目名称) master -f 

你可能感兴趣的:(Git上传项目提示Push rejected: Push to origin/master was rejected解决办法)