XCode Command Line Tools no longer working after upgrade to MacOS Ventura (quick fix!)

This seems to be a recurring issue after every major OS update. You need to reinstall XCode and the Command Line Tools to get them working again.

Trying a ‘git status’ after upgrading to Ventura over the weekend, I get this error:

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

To fix this you need to reinstall the XCode Command Line Tools (described here) with:

xcode-select --install

Press Install when prompted:

After the install completes, restart your Terminal and you should be good to go.

Editing files in your GitHub repo online with Codespaces

Articles online about how to enable your GitHub projects to use Codespaces are not particularly clear about how to get started, whether you need access to the beta or not, whether it is free for personal use or whether you need to pay for a subscription.

I suspect there’s been some changes since the service launched. The easiest way to open a Codespace to edit any file in your repo is to browse to a file and drop down the edit menu and then select Open in GitHub.dev

One you open a single file, the VS Code web interface will load, allowing you to edit any file in that project.