添加--allow-unrelated-histories
解决Git致命错误-“拒绝合并无关的历史记录”
Terminal
$ git pull origin master
From https://github.com/mkyong/java-concurrency
* branch master -> FETCH_HEAD
fatal: refusing to merge unrelated histories
要解决这个问题 :
Terminal
$ git pull origin master --allow-unrelated-histories
From https://github.com/mkyong/java-concurrency
* branch master -> FETCH_HEAD
Merge made by the 'recursive' strategy.
LICENSE | 674 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 674 insertions(+)
create mode 100644 LICENSE
参考文献
翻译自: https://mkyong.com/git/git-pull-refusing-to-merge-unrelated-histories/