首页 > 解决方案 > 如何在 VSC MacOS 上配置 Git Bash

问题描述

如何将Git Bash终端添加到 MacOS 中的 Visual Studio Code?

我看不到该"Configure Default Shell"选项。

标签: bashgitmacosvisual-studio-code

解决方案


Git bash 是一个移植 bash 以及一些在 Windows 上使用的命令行工具的程序。Bash 目前是 mac 上的默认 shell,因此您无需以任何方式安装它。如果缺少 Git Bash 附带的某些工具,您可以install <tool> on mac在 Google 中搜索并找到指南。

如果您不想在 VSCode 中使用与您机器上的标准相同的 shell,您可以通过添加"terminal.integrated.shell.osx": "<shell>",到您的 settings.json 来指定它(可以通过单击“{}设置”中的右上角的图标来找到)。<shell>可以是其中之一运行时显示的指定 shell cat /etc/shells


推荐阅读