本人lowB一枚,
由于项目搭建用到Spring Cloud config,所以不得不熟悉GitHub的代码提交。
在提交时遇到fatal: refusing to merge unrelated histories问题。
度娘后,从各大神文档中得知:
由于是两个不同的项目,如果需要合并,git需要添加一句代码,
该代码是在git 2.9.2版本产生的:–allow-unrelated-histories
及:
git pull origin master --allow-unrelated-histories
本文介绍了一位开发者在使用SpringCloudConfig与GitHub进行代码提交时遇到的fatal: refusing to merge unrelated histories错误。通过搜索,作者找到了解决方案,即在Git 2.9.2版本中引入的--allow-unrelated-histories参数,用于合并两个不相关项目的代码。

209

被折叠的 条评论
为什么被折叠?



