1
我有三个仓库:A,B和CGIT子子模块奇怪的行为
在我的存储库中,我创建了一个子模块向B(A /库/ B)。
在我的存储库B中,我创建了一个朝向C(A/library/B/library/C)的子模块。
我想在我的仓库C上创建一个新的分支:
git clone --recursive C
cd C
git checkout -b branch-test
git touch test
git add test
git commit -m "test"
git push origin branch-test
现在,我想在我的库B创建一个分支和我的新分支,向C中的子模块如下分支我以前创建:
git clone --recursive B
cd B
git checkout -b branch-test
cd library/C
git checkout branch-test
cd ../../
git add library/C
git commit -m "Updating version of submodule C"
git push origin branch-test
直到那里,没有问题。当我做同样的我的存储库中出现的问题:
git clone --recursive A
cd A
git checkout -b branch-test
cd library/B
git checkout branch-test
现在,当我将A /库/ B和I型“混帐分支”,我可以看到我在分支“分支测试“。但是,当我要去A/library/B/library/C和我键入”git分支“时,我可以看到我处于分离的提交而不是分支”分支-测试”。
你知道为什么吗?
问候, 本