VS Code从1.66升级到1.84后Git Bash终端不可用的问题咨询
解决VS Code升级后Git Bash终端消失的问题
VS Code 1.60及以上版本已废弃terminal.integrated.shell.windows配置项,改用terminal.integrated.profiles.windows和terminal.integrated.defaultProfile.windows管理终端配置,这就是升级后Git Bash终端选项消失的原因。
修改你的settings.json配置如下:
{ "git.path": "D:\\Software\\git\\PortableGit\\bin\\git.exe", "terminal.integrated.profiles.windows": { "Git Bash": { "path": "D:\\Software\\git\\PortableGit\\bin\\bash.exe", "icon": "terminal-bash" } }, "terminal.integrated.defaultProfile.windows": "Git Bash" }
操作步骤:
- 打开VS Code,按
Ctrl+,调出设置面板,点击右上角的{}图标进入JSON编辑模式。 - 删除原有的
terminal.integrated.shell.windows配置行,替换为上述新配置。 - 保存配置后,打开终端,点击终端顶部的下拉菜单,就能看到Git Bash选项,选择即可使用。
注意:确保D:\\Software\\git\\PortableGit\\bin\\bash.exe路径真实存在,若你的Git安装路径不同,需对应修改。
内容的提问来源于stack exchange,提问作者erik-stengel
相关产品推荐
相关产品推荐

