git没法pull仓库refusing to merge unrelated histories

本文讲的是把git在最新2.9.2,合并pull两个不一样的项目,出现的问题如何去解决fatal: refusing to merge unrelated historiesgit

我在Github新建一个仓库,写了License,而后把本地一个写了好久仓库上传。it

先pull,由于两个仓库不一样,发现refusing to merge unrelated histories,没法pullast

由于他们是两个不一样的项目,要把两个不一样的项目合并,git须要添加一句代码,在git pull,这句代码是在git 2.9.2版本发生的,最新的版本须要添加--allow-unrelated-histories项目

假如咱们的源是origin,分支是master,那么咱们 须要这样写git pull origin master --allow-unrelated-histories须要知道,咱们的源能够是本地的路径上传

相关文章
相关标签/搜索