如何将 Git Bash 添加到 VsCode

Posted

技术标签:

【中文标题】如何将 Git Bash 添加到 VsCode【英文标题】:How to Add Git Bash to VsCode 【发布时间】:2021-04-02 21:45:06 【问题描述】:

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

【问题讨论】:

【参考方案1】:

    确保你已经安装了Git for Windows

    在 VS Code 中,使用 Terminal: 选择默认配置文件Terminal: 在旧版本中选择 Default Shell 转到命令面板 (⇧⌘P),然后选择可用的 shell在这种情况下,Git Bash,在下拉列表中。

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

此时,Git Bash 应该已经添加成功了。

PS。如果 VS Code 关闭,该列表可能会消失。只有默认的外壳会显示出来。您必须再次执行上述步骤。

【讨论】:

以上是关于如何将 Git Bash 添加到 VsCode的主要内容,如果未能解决你的问题,请参考以下文章

IDE VScode如何开启多个终端powershell或者Git Bash?如何横向显示?

如何在 vscode 终端中使用 git bash 别名?

vscode配置git bash

如何将已生成的 SSH 密钥添加到 git bash?

Git Bash 未在 VSCode 中显示为终端选项

bash 脚本从 bash 脚本添加 git 凭据