pull

问题描述:在新项目的本地执行git pull命令时,出现fatal: refusing to merge unrelated histories错误。

出现原因:因为本地库和远端库是两个根本不相干的 git 库,然后本地要去推送到远端, 远端觉得这个本地库跟自己不相干, 所以告知无法合并

解决方案:

git pull origin master --allow-unrelated-histories

参考文章:git 出现 fatal: refusing to merge unrelated histories 错误