Visual Studio Code git error macOS

visual studio code macos git


I recently upgraded some packages on macOS and when starting a new Visual Studio Code editor the editor complained about not being able to detect installed git. Instead of having to mess around with modifying git.path in the settings try this step first on a mac.


The issue really wasn’t that git was unavailable; It was due to calling git which triggered the xcode license message in the console so possibly the calling script failed to handle this scenario and treated it as any error.

The best way to confirm this is to just call git yourself in a new Terminal session and it may present you with the message:

Agreeing to the Xcode/iOS license requires admin privileges, please run “sudo xcodebuild -license” and then retry this command.

So you can just run the terminal command and then restart VS Code

sudo xcodebuild -license