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.
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!
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With