Visual Studio Code cannot detect installed git

后端 未结 21 2233
走了就别回头了
走了就别回头了 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:35

    I had this problem after upgrading to macOS Catalina.

    The issue is resolved as follows:

    1. Find git location from the terminal:

    which git
    

    2. Add the location of git in settings file with your location:

    settings.json

    "git.path": "/usr/local/bin/git",
    

    Depending on your platform, the user settings file (settings.json) is located here:

    Windows %APPDATA%\Code\User\settings.json

    macOS $HOME/Library/Application Support/Code/User/settings.json

    Linux $HOME/.config/Code/User/settings.json

提交回复
热议问题