github移动repo显示为子模块,无法打开

时间:2016-12-13 03:09:52

标签: github

Repo A上面有几个未合并的分支。 回购B中有几个文件夹。将回购A移动到Repo B内的文件夹中,现在它显示为子模块,无法在github上打开。然而,原始回购A仍然存在于回购B.之外。 目前它是这样的:

 Repo A ---- has many branches un merged.

 Repo B/ folder xyz/ Repo A(it looks grey like submodules and can't be opened)

它看起来和不能打开的图像:
enter image description here

1 个答案:

答案 0 :(得分:2)

如果无法打开,则反应文件夹可能是gitlink(主仓库的special entry in the index

如果你的主仓库中没有.gitmodules文件,那么这个灰色文件夹实际上不是一个子模块,而是一个nested git repo(意思是一个SHA1,不知道回购实际远程网址)。

您可以将其转换为into an actual submodule:在这种情况下,它仍然是一个灰色文件夹,但这次有一个与之关联的链接:请参阅" Working with submodules":

https://cloud.githubusercontent.com/assets/2077/12631413/ce5590e2-c516-11e5-803b-116c5ac2d2b5.png