我對git有點新。當我嘗試推送文件到遠程回購我收到以下錯誤,我經歷了大量的谷歌搜索,但沒有得到正確的答案。任何人請幫助。我也跟着git推操作錯誤
Note: i have some updated files in remote repo added by others
的步驟,推動
我在我的本地回購
我加入,並承諾該文件中的「sample.txt的」,現在我的工作目錄是乾淨的。
現在我想
$ git push sample master
錯誤:
To github.com:xxxxxx/sample.git ! [rejected] master -> master (fetch first) error: failed to push some refs to '[email protected]:xxxxx/sample.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. hint: See the 'Note about fast-forwards' in 'git push --help' for details.`
Note: i have some updated files in remote repo added by others
For reference please check this image
什麼能爲t
branch master -> FETCH_HEAD * [new branch] master -> sample/master fatal: refusing to merge unrelated histories
所以,你需要使用git標誌allow-unrelated-histories
拉:他可能的解決方案?,好心用一個例子
你嘗試讀取錯誤消息的信息? – jonrsharpe
是的,我讀了,我試圖抓取,拉動機器人什麼都沒有工作 –
然後顯示你已經嘗試了什麼,發生了什麼,**作爲文本**。拒絕合併無關的歷史 ' – jonrsharpe