请确定版本大于或等于以下版本号再往下阅读
vscode版本:1.56.2
版本发布日期:2021年5月12日
前情提要
看了很多文章,都是将terminal.integrated.shell.windows
配置项设置为bash.exe的路径,把git bash终端集成至vscode中。
但是新版本的vscode提示不建议继续使用此方法:
This is deprecated, the new recommended way to configure your default shell is by creating a terminal profile in
#terminal.integrated.profiles.osx#
and setting its profile name as the default in#terminal.integrated.defaultProfile.osx#
. This will currently take priority over the new profiles settings but that will change in the future.(2)
建议我们利用#terminal.integrated.profiles.osx#
和#terminal.integrated.defaultProfile.osx#
添加终端并配置为默认终端
配置过程
首先,配置terminal.integrated.profiles.windows
添加Git Bash,path
属性填写git的bash.exe路径
保存setting.json
然后,配置terminal.integrated.defaultProfile.windows
配置默认终端为Git Bash
保存setting.json
重启vscode即可