1. 程式人生 > >Git-上傳衝突解決方法

Git-上傳衝突解決方法

報錯內容:

failed to push some refs to '[email protected]:Sunpro108/Sunpro_Blog.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.

解決方法:

報錯資訊中也給出了建議,就是要合併另外一個遠端修改,執行如下命令:

git pull origin master --allow-unrelated-histories

完美解決!

參考:
wenwen360360的部落格-This is …