git没法pull仓库refusing to merge unrelated histories

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

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

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

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

 

(来自转载)项目

相关文章
相关标签/搜索