git 合并的时候报错

fatal: refusing to merge unrelated histories

有时候会新项目合并的时候会报这个错误,原因其实很简单,就是代码可能是直接从老项目整个拖过来的,导致了

git认为是写错了 origin ,如果开发者确定是这个 origin 就可以使用 --allow-unrelated-histories 告诉 git 自己确定

git pull –allow-unrelated-histories 就可以


已发布

分类

, ,

作者:

评论

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注