Install Git under OSX Mavericks
2013-12
I've just completed a fresh install of Mavericks. Then I went to git-scm.com and downloaded the Mac installer and installed Git from that.
Now whenever I go into the terminal and type git
I get this:
xcode-select: note: no developer tools were found at '/Applications/Xcode.app',
requesting install. Choose an option in the dialog to download the command line
developer tools.
I also this dialog:
The git installer installed git into /usr/local/git/bin
and I've added this to my PATH
but still no dice.
What am I doing wrong here? I don't want to install xcode just so I can use git.
Just download the original git package. The installer will install git under /usr/local/git
(you need to deactivate security options to run the installer).
There is a preinstalled git wrapper in /usr/bin
used by Xcode which does not work without installing Xcode. You need to run /usr/local/git/bin/git
explicit or change the PATH variable to contain /usr/local/git/bin
before /usr/bin
!
Create/edit your ~/.profile
with the following:
PATH=/usr/local/git/bin:$PATH
export PATH
On Mac OS x 10.6.6 I have git installed in /usr/bin/ I wanted to update the git version however the git installer puts it in /usr/local/git/bin/
I realise I could rearrange to path to point to the local one first, but what I do not get is where the /usr/bin/git
version came from.
Could it be part of an xcode install and lastly how would I delete it correctly? I have looked and looked but find nothing, and I didn't install it with ports etc. thanks
Try pkgutil --file-info /usr/bin/git
to see if the system knows where it came from. But my guess is something other than XCode or an Apple package (unless you just installed XCode 4; I have no idea about it) put it there and you should just remove it.