右键 git bash

where bash

复制git bash的路径

打开vscode, ctrl + ,

搜索 shell,
选择 Automation shell: windows , 在settings.json中编辑
image.png

添加配置项

把刚刚复制的路径粘贴到这里
“terminal.integrated.automationShell.windows”: “”,
“terminal.integrated.shell.windows”: “”,

重启vscode即可在终端中查看

注意:
如果 where bash 获取到的路径是 \Git\usr\bin\bash.exe

可能会不生效,去掉 usr 即可
\Git\bin\bash.exe