本来一直使用的GitBash,突然不能使用,变成了windows默认的powershell,如下
然后查看配置文件setting.json,发现是
"terminal.integrated.shell.windows"属性更新了,已弃用。
根据解释,新的配置为:
然后重启Vscode,开启新终端,选择GitBash就可以使用啦
可以正常使用了
如果你的配置还是不能生效,请检查:
1. 使用Git-Bash或者GitBash,不要使用Git Bash
2. 不要在GitBash中,既添加path又添加source,亲测会失效。
错误提示
Value is not accepted. Valid values: "PowerShell", "Command Prompt".(1)
The default profile used on Windows. This setting will currently be ignored if either #terminal.integrated.shell.windows# or #terminal.integrated.shellArgs.windows# are set.
3. 注意path的路径是bash.exe的,不是git.exe的。