【发布时间】:2019-09-24 21:46:20
【问题描述】:
我知道以前有人问过这个问题,但我找到了所有答案,只是为了给我一个快速解决问题的方法,或者对它发生的原因和实际解决方法的令人困惑的解释。
这就是我遇到此错误的方式。我的一个队友将更改推送到我们仓库中的子模块。从主git status 拉出后,在我们的子模块中显示了新的提交:
modified: path/to/submodule/submodule_name (new commits)
所以我决定通过运行来更新子模块
git submodule update path/to/submodule/submodule_name -- here is the doc for this command
此时我得到了错误
Fetched in submodule path 'path/to/submodule/submodule_name', but it did not contain ... Direct fetching of that commit failed
谷歌搜索后,我找到了不同的答案:
超级用户是让我更接近理解问题的链接,github 只是给了我运行命令来修复它 -- git submodule sync
现在,我仍然对我的git status 中如何显示更改感到有些困惑,但是当我尝试更新服务器时,我并不知道提交。 git submodule sync 做了什么来使该提交可用?
【问题讨论】:
标签: git github git-submodules