1.打开vscode设置(ctrl+,)
2.搜索shell:windows
3.点开terminal>integrated>shell.windows的配置
4.把vscode终端变为gitbash;
在配置中添加
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe",//(路径为git安装目录下bin文件夹下的bash.exe路径)
5.把git仓库与vscode关联,以监视文件更改
在配置下的git.path后写入如下
"git.path": "C:\Program Files\Git\bin\git.exe",//(路径为git安装目录下bin文件夹的git.exe路径)