问题:
pull分支的时候出现fatal: refusing to merge unrelated histories
原因:
(1)这是因为远程仓库origin上的分支master和本地分支master被Git认为是不同的仓库,所以不能直接合并。
(2)因为他们是两个不同的项目,要把两个不同的项目合并,git需要添加一句代码,在git pull,这句代码是在git 2.9.2版本发生的,最新的版本需要添加--allow-unrelated-histories
解决方法:
git pull origin master --allow-unrelated-histories