doubleyong
管理员
管理员
  • 最后登录2026-05-10
  • 发帖数1198
  • 最爱沙发
  • 喜欢达人
  • 原创写手
  • 社区居民
  • 忠实会员
阅读:7362回复:0

git pull 失败 ,提示:fatal: refusing to merge unrelated histories

楼主#
更多 发布于:2017-08-19 23:05
git pull 失败 ,提示:fatal: refusing to merge unrelated histories

方案:
关于这个问题,可以参考http://stackoverflow.com/questions/37937984/git-refusing-to-merge-unrelated-histories

在进行Git pull 时,添加一个可选项

git pull origin master --allow-unrelated-histories

原因:
两个不同的项目合并,git需要添加一句代码,在git pull,这句代码是在git 2.9.2版本发生的,最新的版本需要添加--allow-unrelated-histories


参考 :http://blog.csdn.net/lindexi_gd/article/details/52554159
             http://blog.csdn.net/byoooy/article/details/52263404
知识需要管理,知识需要分享
游客


返回顶部

公众号

公众号