合并pull兩個不同的項目的執行個體

來源:互聯網
上載者:User
這篇文章主要介紹了詳解git無法pull倉庫refusing to merge unrelated histories的相關資料,需要的朋友可以參考下

詳解git無法pull倉庫refusing to merge unrelated histories

本文講的是把Git在最新2.9.2,合并pull兩個不同的項目,出現的問題如何去解決

fatal: refusing to merge unrelated histories

我在Github建立一個倉庫,寫了License,然後把本地一個寫了很久倉庫上傳。

先pull,因為兩個倉庫不同,發現refusing to merge unrelated histories,無法pull

因為他們是兩個不同的項目,要把兩個不同的項目合并,git需要添加一句代碼,在git pull,這句代碼是在git 2.9.2版本發生的,最新的版本需要添加--allow-unrelated-histories

假如我們的源是origin,分支是master,那麼我們 需要這樣寫git pull origin master ----allow-unrelated-histories需要知道,我們的源可以是本地的路徑

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.