1. 程式人生 > >Git上傳項目提示Push rejected: Push to origin/master was rejected解決辦法

Git上傳項目提示Push rejected: Push to origin/master was rejected解決辦法

was clas 命令 pull his 被拒 ltr all tran

技術分享圖片

推送被拒絕:推送到源/主被拒絕

首先是你的項目中有和和歷史不符的東西
Push rejected: Push to origin/master was rejected
推拒絕:推送到起源/主人被拒絕
直接是解決辦法,直接打開你要上傳代碼的文件夾位置鼠標右鍵git Bash Here然後直接下面兩行命令解決問題

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

Git上傳項目提示Push rejected: Push to origin/master was rejected解決辦法