我正在使用Windows 10,尝试设置Git Bash终端,但VSCode无法检测到Git的安装或其他什么问题?
我在查看如何设置时,在终端窗口中选择“选择默认shell”,然后选择Git Bash,但对我来说这不是一个选项。VSCode和Git都已正常安装,所以我不明白为什么会出现这种情况?
我需要重新安装这两个应用程序吗?我宁愿不这样做... 有什么建议吗?
我正在使用Windows 10,尝试设置Git Bash终端,但VSCode无法检测到Git的安装或其他什么问题?
我在查看如何设置时,在终端窗口中选择“选择默认shell”,然后选择Git Bash,但对我来说这不是一个选项。VSCode和Git都已正常安装,所以我不明白为什么会出现这种情况?
我需要重新安装这两个应用程序吗?我宁愿不这样做... 有什么建议吗?
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\git-cmd.exe",
"terminal.integrated.shellArgs.windows": [
"--command=usr/bin/bash.exe",
"-l",
"-i"
]
这个问题在 https://code.visualstudio.com/docs/editor/integrated-terminal#_windows 中讨论。
你可能还需要在你的~/.bash_profile
中添加类似以下的内容:
## make Backspace key and other things work in VS Code's Terminal emulator
export TERM=xterm
我已经在https://www.ii.com/git-bash-is-my-preferred-windows-shell/上写了更多相关的技术内容。
%PATH%
:当git.exe
在%PATH%
中时,我没有使用VSCode检测Git的任何问题。Git: Path
(需要输入git.exe
的完整路径,包括git.exe
本身)。
terminal.integrated.shell.windows
和terminal.integrated.shellArgs
已被弃用(请参见https://code.visualstudio.com/updates/v1_56#_terminal)。 - thdoan