How do I solve the problem of “invalid active developer path” when attempting to use Git on VSCode
xcode-select --install


This installs or updates Command Line Tools. It can be done manually too, by downloading the tools from Developer Website.


How to compile with Command Line Tools for Xcode after deleting the Xcode.app application bundle?
Can&#39;t update Developer Tools on Mojave


You might need to point it to the install location of the tools too.

sudo xcode-select -switch /Library/Developer/CommandLineTools


Then restart the Terminal/ VSCode.