Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode took over my git installation, what happened?

Tags:

git

xcode

I've been using git on my MacBook pro for years and have also had xcode installed but rarely if ever used it. Yesterday I accidentally opened xcode and immediately closed it. Then, git commands in my docker environment stopped working (git failed to detect that the directory was a git repo), so I went back to my regular environment and type git status, and saw the below message

You have not agreed to the Xcode license agreements. You must agree to both license agreements below in order to use Xcode.

Press the 'return' key to view the license agreements at '/Applications/Xcode.app/Contents/Resources/en.lproj/License.rtf'

If I run which git the output is /usr/bin/git - is this perhaps a version of git installed by xcode? What happened? How can I get my original git installation back? Thanks

like image 968
the_midnight_developer Avatar asked Mar 20 '26 09:03

the_midnight_developer


1 Answers

I was having the same problem after yesterday's update to Xcode. Running the following command in the Terminal fixed the problem.

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

Source: https://developer.apple.com/forums/thread/666584

like image 65
ChipnCharge Avatar answered Mar 22 '26 23:03

ChipnCharge



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!