Git“致命的:在.gitmodules中找不到路径的子模块映射。。”但未找到子模块引用

问题描述 投票:1回答:1

我已经撤回了公司的回购协议并开始工作;最初的分支是master。在尝试git checkout时,我始终遇到以下错误((反斜杠=换行符)

git -c diff.mnemonicprefix=false -c core.quotepath=false -c \
    credential.helper=sourcetree checkout master 
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.  #so far, so good..


git -c diff.mnemonicprefix=false -c core.quotepath=false \
     -c credential.helper=sourcetree submodule update --init --recursive 
fatal: no submodule mapping found in .gitmodules for path 'vendor/omnipay/pin'
Completed with errors, see above

我已经搜索了有关此问题的答案,但所有这些都涉及某个地方对submodule的引用,包括this one here。但是:

  1. .git/config-完全不包含对子模块的引用

  2. vendor/omnipay/pin-此目录为空,不包含任何隐藏的点文件。

  3. 在此情况下,卖方/全方位付款甚至卖方/中都没有字符串submodule

同样,其他帖子似乎不适用,因为没有文件或子模块行可供参考/删除。这里有什么问题,我该如何解决?

git git-submodules git-checkout
1个回答
0
投票

返回160000次提交04e778e9689882d4c4041​​9263014068b69b93168供应商/全方位付款/ pin

这是索引链接中的特殊项“ gitlink”,它记录了嵌套Git存储库的根树的sHA1。这就是文件夹显示为空的原因:它是嵌套存储库的占位符。

如果有.gitmodules文件,应该有一个提及where的条目以查找应该在该路径中检出的远程存储库。

如果没有,请至少尝试使用git rm vendor/omnipay/pin(无斜杠),然后再输入git submodule update --init --recursive

© www.soinside.com 2019 - 2024. All rights reserved.