refusing to merge unrelated histories

7次阅读

共计 360 个字符,预计需要花费 1 分钟才能阅读完成。

本文讲的是把 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

正文完
 0