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
After an OSX update i had to run xcode-select --install
for the gitlens to work
If you have multiple environments. You could include Git Path in the VS Code Workspace Setting. For Windows, depending on your setting, you could hit Ctlr + P, search for "settings". Open setting.json(or File>Preferences>Settings). Navigate to Workspace Settings. Find "Path" and add paths to Git bin and cmd folders.
Environments can have their own paths. I discovered this when I echoed my PC %PATH% on cmd, git bin and cmd path where available but when I was working on my project, echoed %PATH% did not have git and cmd folder. Adding them, as shown above solved the issue.
Extra Notes:
On cmd, you can echo "%PATH%" and see if git bin and cmd folders are included. If not, you could concatenate using SETX PATH on, e,g
SETX PATH "%PATH%;Path_to_Git_bin;Path_to_Gt_cmd;"
This will make git available on local root but not on some environments which comes with their own paths(SETX /M PATH "%PATH%;Path_to_Git_bin;Path_to_Gt_cmd;" would have though).
In case you have a long Path that is chopped off dues to Path length(getting "Error: Truncated at X characters." message), you can increase the path length on regedit.
This will increase your path length. If it is already one, then I am not sure how to proceed from there :).
[6 []6
First install Git onto your desktop, then Add the encircled extension in vscode, as seen in the picture.
That helped me fix the same issue you have.
I faced this problem on MacOS High Sierra 10.13.5
after upgrading Xcode
.
When I run git
command, I received below message:
Agreeing to the Xcode/iOS license requires admin privileges, please run “sudo xcodebuild -license” and then retry this command.
After running sudo xcodebuild -license
command, below message appears:
You have not agreed to the Xcode license agreements. You must agree to both license agreements below in order to use Xcode.
Hit the Enter key to view the license agreements at '/Applications/Xcode.app/Contents/Resources/English.lproj/License.rtf'
Typing Enter
key to open license agreements and typing space
key to review details of it, until below message appears:
By typing 'agree' you are agreeing to the terms of the software license agreements. Type 'print' to print them or anything else to cancel, [agree, print, cancel]
The final step is simply typing agree
to sign with the license agreement.
After typing git
command, we can check that VSCode detected git again.
I found that i had git: false in settings.json. Changed it to true and works now.
Hope that helped, and last but not least, it's 'git' not 'Git'/'gat'. :)