我有一个 git 存储库(我将其称为ml
)位于
ssh://ml-fey/usr/projects/data/nuclear/mc/type1
这个存储库有一个子模块。.gitmodules
文件看起来像这样
[submodule "Appendix"]
path = Appendix
url = /usr/projects/data/nuclear/mc/type1/Appendix
我可以将存储库克隆到一个新的存储库(我将其称为XL
),但是当我尝试更新子模块时出现此错误
$ git submodule update
Cloning into 'Appendix'...
fatal: '/usr/projects/data/nuclear/mc/Appendix' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Clone of 'ssh://ml-fey/usr/projects/data/nuclear/mc/Appendix' into submodule path 'Appendix' failed
请注意,从中搜索Appendix
子模块的目录缺少最终type1
目录。git无法更新子模块的原因XL
是因为ssh://ml-fey/usr/projects/data/nuclear/mc/Appendix
不存在。去哪儿了type1
?
存储库的.gitmodules
文件XL
如下所示:
[submodule "Appendix"]
path = Appendix
url = /usr/projects/data/nuclear/mc/type1/Appendix