Back

Explore Courses Blog Tutorials Interview Questions
+8 votes
2 views
in DevOps and Agile by (29.3k points)
edited by

Last night I updated to macOS Mojave,

This morning I navigated to my work's codebase in Command line on my MacBook Pro,

typed in "git status" in the repo and received the error:

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

1 Answer

+8 votes
by (50.2k points)
edited by

This problem occurs due to Xcode command-line tools are not updated.

For updating Xcode command-line tools

Goto terminal and use the following command:

xcode-select --install

Then it shows 

xcode-select: note: install requested for command line developer tools

And opens a window to update Xcode command-line tools.

After the update is completed, open a new terminal window and your development tools should be returned.

After the update you need to restart your terminal to apply the updates then the function works properly.

Reference:https://developer.apple.com/library/archive/technotes/tn2339/_index.html

For more information regarding git commands, like git status, git clone, git merge, etc. please go through this tutorial.

Related questions

Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers

500 comments

94.1k users

Browse Categories

...