【1】打开VScode
文件-->>首选项-->>设置
搜索,shell.windows
点击settings.json编辑
把下面的语句复制进去
{
"terminal.integrated.profiles.windows": {
"PowerShell": {
"source": "PowerShell",
"icon": "terminal-powershell"
},
"Command Prompt": {
"path": [
"${env:windir}\\Sysnative\\cmd.exe",
"${env:windir}\\System32\\cmd.exe"
],
"args": [],
"icon": "terminal-cmd"
},
"Git-Bash": {
"path": "D:\\softinstall\\Git\\bin\\bash.exe"
}
},
"terminal.integrated.automationShell.windows": "D:\\softinstall\\Git\\bin\\bash.exe",
"git.path": "D:\\softinstall\\Git\bin\\git.exe",
"terminal.integrated.defaultProfile.windows": "Git-Bash",
}
注意改3处
把路径变成自己的就行
再去刚刚的shell.window下发现终端以及有Git-Bash了