Search code examples
xcodegitandroid-studiogithub-for-mac

How to continue using Git on mac after uninstalling Xcode (with Android Studio)?


I have installed Git on my Mac. When I do a "whereis" in my terminal the route is:

/usr/bin/git

I use Android Studio and the GitHub desktop client and had no problems so far.

Previously I had installed Xcode, but I uninstalled it a week ago. Since then, Android Studio does not detect Git, I get the following error:

xcrun: error: active developer path ("/Volumes/Vega/Applications/Xcode.app/Contents/Developer") does not exist, use xcode-select --switch path/to/Xcode.app to specify the Xcode that you wish to use for command line developer tools (or see man xcode-select)

Android Studio shows the same executable path to Git indicating the terminal (/usr/bin/git), but when I click on the "test" button it displays the same error.

I do not handle very well Git from the terminal, always use the desktop client.

What do I have to do to continue using Git on my Android studio (or anywhere) now that I uninstalled Xcode?

I searched for information but I can not fix it.


Solution

  • You should install the Xcode command line tools at the very least. If you're not a registered Apple Developer, however, I'm not sure how to get hold of them if Xcode is not installed. If you are a registered Apple Developer, you can get them from the Apple Developer Download site. It' probably best to re-install Xcode and you will get them as a system update.

    That will give you a minimal development environment, and if you need additional tools/libraries you can build them via Macports with the command line tools installed.