Reputation: 71
So I've had quite some trouble trying to get git and VS Code to work together, I've found the $PATH for git in terminal (/usr/bin/git) but when I try to edit it in settings.json this doesn't seem to work. Null stays. Do you have any other method to get this working? I've even tried exporting the $PATH in terminal.
Upvotes: 7
Views: 15010
Reputation: 93
Like the other answers suggest, you can do XCode license agreement.
When I did that I was a bit unhappy about downloading 11 GB of Xcode just for license agreement.
I've got the hint to install git
as well as Node
via brew
which then will manage the dependencies, because also Node is sometimes managed by Xcode license
So next time you have a new fresh OS use in your shell:
brew install git
Some more information about the two gits on the operating system here.
Upvotes: 1
Reputation: 170
My issue was that Xcode had updated it's legal Terms and I hadn't agreed to them yet so it was blocking VScode from using git. I found this out by running the command
git status
And I got back:
Agreeing to the Xcode/iOS license requires admin privileges, please run “sudo xcodebuild -license” and then retry this command.
So I followed the instructions and agreed to the Xcode/iOS license. Then I restarted VScode and my gitlens extension worked like a charm!
Upvotes: 5
Reputation: 629
Thanks a lot for all answers. Here is what I think is my problem.
For this install I must mount a folder via SSH (there are many many test servers connected that I cannot set up locally) and on the server it finds git 1.8.3. So I just ignores it for now.
Upvotes: 0
Reputation: 96
you can test and check your vscode without any extension and maybe it will work! It works for me, test it this way :
CTRL + Shift + P and then write: reload window with extensions disabled
now check if it works or not.
Upvotes: 1
Reputation: 855
I had a similar problem. It was caused by 2 issues:
In VS Code -> Preferences -> Settings, make sure you put this line:
"git.path": "/usr/bin"
It was set to null in my installation. Also, in the latest version of Code, the user settings are opened in a side window and you add your value there.
Upvotes: 26