Visual Studio Code cannot detect installed git

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

    1. Make sure git is enabled (File --> Preferences --> Git Enabled) as other have mentioned.
    2. Make sure Gits installed and in the PATH (with the correct location, by default: C:\Program Files\Git\cmd) - PATH on system variables btw
    3. Change default terminal, Powershell can be a bit funny, I recommend Git BASH but cmd is fine, this can be done by selecting the terminal dropdown and selecting 'set default shell' then creating a new terminal with the + button.
    4. Restarting VS Code, sometimes Reboot if that fails.

    Hope that helped, and last but not least, it's 'git' not 'Git'/'gat'. :)

提交回复
热议问题