与子模块关联的提交引用何时在其包含的超级项目中更新?
When does the commit reference associated with a submodule get updated in its containing superproject?
通过阅读 Git 文档(特别是这个页面,以及相关的命令参考页面:https://git-scm.com/book/en/v2/Git-Tools-Submodules)我仍然觉得有点不清楚子模块的相关 SHA 到底是什么时候,据 "git diff --cached SomeSubModule" 报道,已更新,因为文本在主题上不是很明确。
似乎暗示的是,当子模块中当前检出的提交发生更改时(例如通过 "git submodule update --remote"),然后在超级项目中进行提交以反映此更改时,引用会更新.但是,我想验证这是正确的还是我误解了。
the reference updates when the currently checked out commit in the submodule is changed
是的,但不仅限于 git submodule update --remote
。
如果在子模块中进行(或获取)任何提交,它就会更改。
and then a commit is made in the superproject to reflect this change
更准确地说,添加并提交更改的元素,该元素是 gitlink (special entry in the main repo index)
您还可以从父存储库更新该 gitlink:请参阅“”。
通过阅读 Git 文档(特别是这个页面,以及相关的命令参考页面:https://git-scm.com/book/en/v2/Git-Tools-Submodules)我仍然觉得有点不清楚子模块的相关 SHA 到底是什么时候,据 "git diff --cached SomeSubModule" 报道,已更新,因为文本在主题上不是很明确。
似乎暗示的是,当子模块中当前检出的提交发生更改时(例如通过 "git submodule update --remote"),然后在超级项目中进行提交以反映此更改时,引用会更新.但是,我想验证这是正确的还是我误解了。
the reference updates when the currently checked out commit in the submodule is changed
是的,但不仅限于 git submodule update --remote
。
如果在子模块中进行(或获取)任何提交,它就会更改。
and then a commit is made in the superproject to reflect this change
更准确地说,添加并提交更改的元素,该元素是 gitlink (special entry in the main repo index)
您还可以从父存储库更新该 gitlink:请参阅“