---
title: MacOS: Git error: xcrun invalid active developer path
description: If you've tried to run a `git` command and it failed with this error, here is a simple fix.
date: 2021-03-15
tags: MacOS, GIT, Xcode
source: https://brianchildress.co/blog/mac-os-xcrun-invalid-active-developer-path
---

# MacOS: Git error: xcrun invalid active developer path

Recently I tried to run the `git branch` command on a local repository. While it worked just the other day, now I'm receiving this error:

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


**The problem:** I recently updated my OS and things are a bit out of sync.

**The solution:** Install the Xcode Toolkit

``` sh
xcode-select --install
```

If this does not work, you may need to download Xcode manually from the [Apple Developer Downloads](https://developer.apple.com/xcode/resources/) site.
