Visual Studio代码:使用Git Bash(windows)

Jar*_*red 4 git-bash visual-studio-code

我发现了一些问题,指出使用Git Bash和完整的Visual Studio,但是我无法找到任何关于如何设置Visual Studio Code提供的内置终端的方向Git Bash .这可能吗?

小智 7

接受的答案没有回答原始问题:How to use git-bash in VS Code。

"terminal.integrated.shell.windows":  "C:\\Git\\bin\\bash.exe"
Run Code Online (Sandbox Code Playgroud)

只需将 C:\Git 文件夹的路径替换为 git 安装的实际路径。


Mar*_*ark 6

您的工作区有此设置:

//终端在Windows上使用的shell的路径.使用Windows附带的shell(在Ubuntu上使用cmd,PowerShell或Bash)时,更喜欢使用C:\ Windows\System32上的C:\ Windows\sysnative来使用64位版本.

"terminal.integrated.shell.windows":  “C:\\Windows\\sysnative\\bash.exe”,
Run Code Online (Sandbox Code Playgroud)

假设你已经安装了它.我在这里找到了这个信息:

在vscode中安装和设置git bash