说明
注意
有时在pull或merge时会出现错误:fatal: refusing to merge unrelated histories
.
解决办法:
git merge origin/master --allow-unrelated-histories
结果如下:
$ git merge origin/master --allow-unrelated-histories
Already up to date!
Merge made by the 'recursive' strategy.
只需要在命令的最后面添加--allow-unrelated-histories
,这句话是告诉Git允许不相关历史合并。