這個問題出現(xiàn)在將本地項目改為git項目的過程中
將本地項目改為git項目愿险,在當前項目根目錄下執(zhí)行
git init
線上創(chuàng)建git項目,獲取到ssh地址或是http地址厦章,然后指定本地項目的git地址為創(chuàng)建項目的地址
git remote add xxxx.git
嘗試提交代碼,初次提交需要先pull,這是就出現(xiàn)了標題的報錯 fatal: refusing to merge unrelated histories
男翰,執(zhí)行
git pull --allow-unrelated-histories
這樣即可pull成功
unreleated histories
looking for the meaning