I use my Mac for S/W development and use git as my version control tool. I have never wanted/needed X-code in the past so never installed it. I recently upgraded to Mojave and noticed my git no longer works. The error "missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun" appears, and is easily googled with a recommendation of running "xcode-select --install". When I do that, I get the pop-up offering to install the command line tools with options: get Xcode, Not now, and install. I choose install and then get the "Can't install the software because it is not currently available from the Software Update Server". Once again something easily googled. Unfortunately it seems all the recommendations center around installing Xcode which I really don't want to do. Is there a solution to this that doesn't involve loading the entire Xcode application? I'm ok with just the CLI, but would like to avoid Xcode if possible. Appreciate any suggestions.
Which git is actually running when you run git? If you're using shell cmds, enter
type git or
which git in the shell to have it tell you the git it's running.
If you're running git from somewhere other than a shell, please tell us how you're running it.
When you used git before, where was it running from? Is that the same as the output of
which git?
The reason I've asked those questions is because Mojave may have done a few different things to break git. It may also have done something I haven't listed.
First, Mojave may have put a 'git' command into a dir in the PATH that's earlier in the search order than where you placed your git.
Second, it may have added a dir to the PATH that results in a different git than the one you were using before. This is effectively the same as the "First" possibility immediately above, but there are two distinct possible causes.
Third, Mojave could have installed some system libraries or frameworks that are no longer compatible with your original git, so even though your original git is being found and run, its reliance on a lib or framework has been damaged.
Finally, what happens if you change your PATH so your original git gets found and run before whatever git Mojave is running by default?