1、打开vscode编辑器
2、找到设置按钮-设置-搜索settings.json
3、打开settings.json文件
4、加入代码
~~~新版本:
{
"terminal.integrated.profiles.windows": {
"Git-Bash":{
"path":"D:\\MySoftware\\Git\\bin\\bash.exe", //git 安装目录
"args":[]
},
"PowerShell -NoProfile":{
"source": "PowerShell",
"args": ["-NoProfile"]
}
},
"terminal.integrated.defaultProfile.windows": "Git-Bash",
}
~~~旧版本: "terminal.integrated.shell.windows": "D:\\MySoftware\\Git\\bin\\bash.exe",