其他分享
首页 > 其他分享> > git报错:refusing to merge unrelated histories

git报错:refusing to merge unrelated histories

作者:互联网

合并pull两个不同的项目,出现的问题如何去解决fatal: refusing to merge unrelated histories

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

假如我们的源是origin,分支是master,那么我们 需要这样写git pull origin master --allow-unrelated-histories

标签:origin,pull,git,refusing,histories,unrelated,报错,master
来源: https://www.cnblogs.com/Mr-fang/p/16459482.html