git pull 失败 ,提示:fatal: refusing to merge unrelated histories

首次 git pull 时失败,并提示:fatal: refusing to merge unrelated histories

在使用git pull 命令时,添加一个可选项

git pull origin master --allow-unrelated-histories

就是告诉系统我允许合并不相关历史的内容。

然后在 git push -u origin master。

原文地址:https://www.cnblogs.com/intangible/p/7261638.html