Software⏱️ 2 min read📅 2026-05-30

How to Fix: Git is not working after macOS update ("xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools")

Git error after macOS update: xcrun invalid active developer path. Solution involves reinstalling Xcode.

Quick Answer: Reinstall Xcode and try again.

The error you're experiencing is due to the Xcode command-line tools not being properly installed or updated on your macOS system. This issue can occur after a major operating system update, such as the one you recently experienced.

🚀 How to Resolve This Issue

  • Reinstall the Xcode command-line tools:

Method 1: Reinstalling Xcode Command-Line Tools

  1. Step 1: Open the Terminal app on your MacBook Pro and type the following command to reinstall the Xcode command-line tools: xcode-select --install

Method 2: Updating Xcode

  1. Step 1: Open the App Store on your MacBook Pro and search for "Xcode". Click the “Get” button to download and install the latest version of Xcode.

✨ Wrapping Up

By following these steps, you should be able to resolve the error and get Git working on your MacBook Pro again.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions