El capitan upgrade causing git not detected

Im using GIT and am trying to push my code and getting the following error when using the Terminal.

The command I tried using was:

git branch Networking

Error:

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

seems like this problem caused after I upgrade my OSX to El Capitan

the solution is very simple, open your terminal and run this 

xcode-select –install

After installation, my /Library/Developer/CommandLineTools/usr/bin directory reappeared and git started working again.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s