新建了一個倉庫之后,git拉取的時候济瓢,出現(xiàn)了如下錯誤:
$ git pull
fatal: refusing to merge unrelated histories
出現(xiàn)這個問題一般是因為倉庫中已經(jīng)有了文件错森,比如README.md
解決方案
在你操作命令后面加 --allow-unrelated-histories
例如:
$ git pull --allow-unrelated-histories
先把代碼倉庫clone到本地本鸣,然后把文件拷貝進去