在git pull或者git push中都有可能会遇到,这是因为两个分支没有取得关系,解决办法是在操作命令后面加--allow-unrelated-histories
--allow-unrelated-histories
解决方案:首先git pull origin master --allow-unrelated-histories
git pull origin master --allow-unrelated-histories
git常见问题
原文:https://www.cnblogs.com/zyscn/p/11638316.html