fab*_*ian 9 visual-studio-code
每当我打开包含子模块的 Git 项目时,VSCode 还会在源代码管理视图中打开所有子模块。这会使源代码管理视图变得混乱,尤其是对于具有 10 多个子模块的项目。
如何让 VSCode 只打开当前“根”Git 项目?
例如,这里accel...是“根”项目, 和unive...是matpl...子模块。

我可以浏览所有子模块并手动关闭它们,但这非常乏味。
谢谢
Pau*_*erg 11
您可以使用git.detectSubmodules这样的设置:
{
"git.detectSubmodules": false
}
Run Code Online (Sandbox Code Playgroud)
小智 5
我遵循此处给出的答案 https://github.com/microsoft/vscode/issues/53668#issuecomment-403398048 ,它对我有用。
转到 VS Code 设置(使用Ctrl+Shift+P并键入settings然后单击Preferences: Open Settings (UI)),然后搜索Git: Auto Repository Detection并将其更改为openEditors。
关闭并重新打开 VS Code 时,子模块不应出现在板上Source Control。
| 归档时间: |
|
| 查看次数: |
4898 次 |
| 最近记录: |