说明
有时在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允许不相关历史合并。
文档更新时间: 2020-08-08 21:55 作者:kuteng