Visual Studio Code cannot detect installed git

后端 未结 21 2265
走了就别回头了
走了就别回头了 2020-11-30 21:54

Visual Studio Code reports \"It look like git is not installed on your system.\" when I try to switch to the git view. I know I have git installed and used by other git clie

21条回答
  •  悲&欢浪女
    2020-11-30 22:34

    Update 2020 (Mac)

    Went through this $h!† again after updating to Catalina, which requires an XCode update.

    And to clarify, while this post is about VS Code, this issue, is system wide. Your git install is affected/hosed. You can try to run git in your terminal/bash/zsh or whatever it is now and it just won't.

    Same fix, just update XCode, start it up and agree to license. That's it.


    Old post, but just hit this on MAC/OSXso hope this helps someone.

    Symptoms:

    • You've been using VS Code for some time and have no issues with Git
    • You install XCode (for whatever reason - OS update, etc)
    • After installing XCode, VS Code suddenly "can't find Git and asks you to either install or set the Path in settings"

    Quick fix:

    Run XCode (for the first time, after installing) and agree to license. That's it.

    How I stumbled upon this "fix":

    After going through numerous tips about checking git, e.g. which git and git --version, the latter actually offered clues with this Terminal message:

    Agreeing to the Xcode/iOS license requires admin privileges, please run “sudo xcodebuild -license” and then retry this command.

    As to why XCode would even wrap it's hands on git, WAT

    Happy holidays and happy coding :)

提交回复
热议问题