为什么git子模块路径错误?

为什么git子模块路径错误?,git,git-submodules,Git,Git Submodules,我有一个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,但是当我尝试更新子模块时,会出现此错误 $ gi

我有一个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
请注意,从中搜索附录子模块的目录缺少最终的type1目录。git无法更新XL中的子模块的原因是ssh://ml-fey/usr/projects/data/nuclear/mc/Appendix 不存在。1号打字机去哪了

XL存储库的.gitmodules文件如下所示:

[submodule "Appendix"]
    path = Appendix
    url = /usr/projects/data/nuclear/mc/type1/Appendix

子模块也在.git/config文件中调用。那里的URL正确吗?如果没有,您可以使用git submodule sync来进行同步。

子模块也会在.git/config文件中调用。那里的URL正确吗?如果没有,您可以使用git子模块sync来进行同步。

我还没有足够的声誉,所以我把它作为新的答案。在子模块目录中执行git submodule sync命令,而不是在父git根目录中执行。

我还没有足够的声誉,所以我把它作为新的答案。在子模块目录中执行git submodule sync命令,而不是在父git根目录中执行。

这正是我要找的。.git模块中的冗余令人困惑。谢谢,这正是我要找的。.git模块中的冗余令人困惑。非常感谢。