git push時出現Updates were rejected because the tip of your current branch is behind的解決辦法

在這裏插入圖片描述

這個問題引起的原因是你的遠程庫有更新,本地倉庫與線上倉庫的內容不匹配,或者說本地相對於遠程不是最新,先pull更新本地,再把自己的push上去。
解決辦法:
1.git pull origin master --allow-unrelated-histories

2.git pull origin master

3.git push -u origin master

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章