Git踩坑记录

56 阅读1分钟

1、错误1:fatal: refusing to merge unrelated histories

这个错误可能出现git pull或者git push中都会出现,原因是两个历史分支没取得联系,

解决方案

在后面加入命令 --allow-unrelated-histories

  • 示例

    git push/pull/merge origin master --allow-unrelated-histories