问题描述
我试图弄清楚'git subtree'是如何工作的。我已经遵循,但我总是遇到一个错误,试图合并我自己的repo中的子树项目('Step 2'):致命:拒绝合并不相关的历史记录
。
I'm trying to figure out how 'git subtree' works. I've followed all directions on this page, but I always get an error trying to merge the subtree project in my own repo ('Step 2'): fatal: refusing to merge unrelated histories
.
我已阅读,当我使用 - allow-unrelated-history
选项时,它似乎工作正常。然而,我不确定我是否应该使用这个......我的印象是,子树的全部要点是在一个存储库中有不相关的历史记录,所以必须添加该选项感觉很奇怪。我应该添加它,还是我做错了什么?
I've read this post, and when I use the --allow-unrelated-histories
option, it seems to work fine. However, I'm not sure whether I should use this...My impression is that the whole point of subtrees is to have unrelated histories within one repository, so it feels strange to have to add the option. Should I add it nevertheless, or am I doing something wrong?
我在osx 10.11.6上使用git v2.9.3
I'm using git v2.9.3 on osx 10.11.6
这是git中的一个bug,它在
This was a bug in git, it was fixed in https://github.com/git/git/commit/0f12c7d4d175bb0566208213b1b340b6794f305c
另见:
这篇关于git子树错误“致命:拒绝合并不相关的历史记录”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!