New machine setup

Fix "xcrun: error: invalid active developer path"

Git and other tools stop working after a macOS update. Reinstall the Command Line Tools to fix it.

  1. Reinstall the Command Line Tools
    Terminal
    xcode-select --install

    A window pops up. Click Install and wait a few minutes.

  2. If it says they're already installed, reset the pathNeeds sudo
    Terminal
    sudo xcode-select --reset

Check it worked

  1. Check Git works again
    Terminal
    git --version

This error only happens on macOS.

This error only happens on macOS.