如何将 Git Bash 添加到 VsCode

How to Add Git Bash to VsCode

It is not showing Git Bash Option in while selecting terminal in VsCode

  1. 确保你已经安装了Git for Windows

  2. 在 VS 代码中,使用 终端转到命令面板 (⇧⌘P):Select 默认配置文件 终端: Select 在旧版本中默认 Shell,然后 select 可用 shell 在这种情况下,Git Bash,在下拉列表中。

  3. 点击终端列表旁边的+号,如下图所示:

至此,GitBash应该添加成功了。

PS。如果关闭 VS Code,该列表可能会消失。只有默认值 shell 会显示。您必须重新执行上述步骤。