Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't start Git in OS X El Capitan

I upgrated my os x from mavericks to EL Capitan and when want to use git in android studio, i got this error:

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

Anyone have a solution?

like image 516
Ahmad Vatani Avatar asked Oct 28 '15 05:10

Ahmad Vatani


People also ask

How do I know if git is installed on my Mac?

How do I know if Git is installed? To see if Git is installed on your system, open your terminal and type git --version . If your terminal returns a Git version as an output, that confirms you have Git installed on your system. If not, you have to download Git for Mac or Windows.

How do I open git Bash on Mac?

In Mac you've already got Bash. If you go to your Launchpad and search for Terminal , this is the application you'll use. In Windows you got Bash when you installed Git. Go to Programs > Git and select Git Bash .

Where is git EXE Mac?

Git executable can be found by using running git --exec-path, which usually lives in the Git execution path. git --exec-path will give you the path.


2 Answers

See this solution:

After updating Mac OS X to ‘El Capitan’, my local git command was not working anymore. When using the git command, the command line returns:

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

The solution to fix this is to reinstall the command line developer tools using this command:

xcode-select --install

like image 89
Muhammad Ali Avatar answered Oct 26 '22 06:10

Muhammad Ali


Faced this after upgrading to El-Capitan

xcode-select --install 

didn't work for me even after 'Finding Software' and Downloading. I don't have Xcode.app installed (Didn't want to install it) so i fixed it by downloading Command Line Tools from https://developer.apple.com/downloads/ (requires Apple SignIn) and installed it manually.

After installation i was able to run git commands again

like image 2
William Mandai Avatar answered Oct 26 '22 05:10

William Mandai