在settings.json文件中添加下列代码(将bash路径替换为你自己的) "terminal.integrated.profiles.windows": { "Bash": { "path": "D:\\Software\\cmder\\vendor\\git-for-windows\\bin\\bash.exe" }, }, "terminal.integrated.defaultProfile.windows": "Bash", 重启vscode