Installing git on my Mac - error: invalid active developer path

Hi all,

I am trying to install git on my Mac from the command line and used the following instructions from git-scm.com:

Unfortunately, when I type the command git --version, I get the following error:

Does anybody know what to do, when this type of error occurs? Thanks for your help!

You need to install the command line developer tools on Mac OS X. OS X already ships with git and after an update and generally a new machine setup, you need to install these tools for things to work properly.

To do this, simply run this in your Terminal:

xcode-select --install

and follow the on-screen instructions (which is just a single press of a button, if I remember correctly), and then git should work flawlessly!

3 Likes