使用版本 1.22.2。根据release notes from VS Code 1.2 ,应该了解 Git 子模块。但是,我似乎无法使用此功能:
- 打开一个包含 git 项目的文件夹,该项目又包含子模块
- 对其中一个子模块进行更改
- 观察源代码控制 View 仅说明主存储库中更改的子模块对象
最佳答案
There is basic support in place which lets you stage, unstage or discard submodule changes in the outer repository. You can disable automatic submodule detection with the git.detectSubmodules setting.
我怀疑“子模块更改”只是记录在父 repo 索引中的顶级树 SHA1(gitlink),而不是该子模块中的文件。
gitlink 是发行说明中图片中显示的差异:
关于VS 代码中的 Git 子模块意识不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50167478/