bash - Visual Studio Code "Git not found"

标签 bash git visual-studio-code

我有带有 Ubuntu bash 和 Visual Studio Code 的 Windows10。

每次我启动 Visual Studio Code 时都会提示一条警告:

Git not found. Install it or configure it using the 'git.path' setting

我通过 bash 终端实际安装了 git:

# which git
/usr/bin/git

如何指示 Visual Studio Code 使用安装在 bash 终端中的 git?

我已经尝试通过 git.path 设置,但我不确定如何将路径设置为相对于 bash 终端的路径。

最佳答案

如果您在 Windows 上运行 Visual Studio Code,则还需要安装适用于 Windows 的 Git。 VsCode 目前无法访问 linux 子系统上的 git。

关于bash - Visual Studio Code "Git not found",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48873161/

相关文章:

git - 如何让 Git 忽略符号链接(symbolic link)?

linux - 如何将 Visual Studio Code 与 Haskell 和 Docker 结合使用

python - 如何让python程序使用不同的安装方式

bash - 如何使用 sed 将 LF 替换为空格,而不是 CRLF?

git - 如何在最后一次 X 提交中添加的行中搜索和替换字符串?

javascript - 类型上不存在属性(编辑器内部)

python-3.x - 是否有用于变量名称的 Python (3) lint,例如 'len'(内置函数/保留字等)

bash - cp : target is not a directory

bash - 如何在 Tmux 的另一个 Pane 中打开文件

windows - ~/.git-credentials 文件在 Windows 10 中的位置?