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

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

git pull origin master --allow-unrelated-histories

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

然后在 git push -u origin master。

相关文章:

  • 2021-10-13
  • 2021-04-19
  • 2022-12-23
  • 2022-12-23
  • 2021-07-27
  • 2022-12-23
  • 2021-08-21
  • 2021-07-06
猜你喜欢
  • 2022-12-23
  • 2021-04-16
  • 2021-10-22
  • 2021-08-11
  • 2022-12-23
  • 2021-08-11
相关资源
相似解决方案