【问题标题】:Does VSCode come with git itself?VSCode 自带 git 吗?
【发布时间】:2017-04-12 22:27:42
【问题描述】:

文档说 VSCode 没有随 git 一起提供,它利用了你机器的 git 安装,你必须安装它。

但是,它对我来说效果很好。我只有 github 桌面,我绝对肯定我没有安装 git for windows 并且 github 桌面没有将自己放在我的 PATH 中。 (从技术上讲,我确实在 WSL 上的 Bash 上有 git,但我知道 vscode 不是/无法访问它)。然而,它在最长的时间内运行良好。

那么,我的问题是,vscode 是否带有自己的 git 可执行文件?我问是因为自从我在我的 github 帐户上设置了 2 因素身份验证后,我每次推送时都必须手动登录,它不像 git shell 那样使用我存储在 username/.ssh 中的 SSH 密钥。

【问题讨论】:

  • 在 cmd 控制台中显示where git 的输出?

标签: windows git ssh visual-studio-code


【解决方案1】:

Github Desktop 为您安装 git,通常位于“C:\Program Files\Git”,在您的情况下,这是 VSCode 最有可能使用的。

如果你参考这篇文章的答案:

VSCode Terminal + Git Bash "command not found" for any command

它显示了您需要添加以允许使用 git bash 和登录的设置 (settings.json)。

希望这会有所帮助!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-04-01
    • 2021-12-13
    • 1970-01-01
    • 2022-05-26
    • 2021-12-26
    • 2021-04-07
    • 2017-11-10
    • 2019-10-20
    相关资源
    最近更新 更多