fatal: refusing to merge unrelated histories

报错

# git pull
fatal: refusing to merge unrelated histories

分析

  1. 会出现在 git merge git push git pull
  2. 因为两个分支没有取得关系

解决

在操作命令后面加上 --allow-unrelated-histories

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