git pull 失败,fatal: refusing to merge unrelated histories
问题处在本地仓库有文件,远程仓库有别的文件,合并时报错。
参考:
https://stackoverflow.com/questions/37937984/git-refusing-to-merge-unrelated-histories-on-rebase
在git pull的时候添加选项 –allow-unrelated-histories
git pull origin master --allow-unrelated-histories
本文介绍了一种在遇到gitpull失败且提示fatal: refusing to merge unrelated histories错误时的解决方案。通常这种错误发生在本地仓库与远程仓库文件不一致时。文章提供了一个简单的命令行指令来解决这一问题。
1万+

被折叠的 条评论
为什么被折叠?



