UPDATE: What may be a simpler approach is to edit the
Updating the PATH variable will allow Mac OS X to be able to find the binary from a custom install of Git. Apple ships a version of Git with Xcode, but its version may lag behind Git's releases. As such it may be desirable to use the official version from Git itself. The Git installer puts the binary at
Starting with at least version 10.9 of Mac OS X, Git has had the unfortunate problem of not being invoked with the "conventional" commands from the terminal. That is to say, running the command
This cue is helpful if Git isn't already installed on the system. But if the installer from Git is used to put the program on the system, updating the PATH variable can alleviate this issue. The trick is to put the path ahead of the current path the Mac will look in. This should do it:
/etc/paths
file by adding an entry for /usr/local/git/bin
at the top of the file. It seems that the solution presented in this article does not persist. Updating the PATH variable will allow Mac OS X to be able to find the binary from a custom install of Git. Apple ships a version of Git with Xcode, but its version may lag behind Git's releases. As such it may be desirable to use the official version from Git itself. The Git installer puts the binary at
/usr/local/git/bin
which is not in the PATH variable.Starting with at least version 10.9 of Mac OS X, Git has had the unfortunate problem of not being invoked with the "conventional" commands from the terminal. That is to say, running the command
git status
, for example, would generate an error stating:The "git" command requires the command line developer tools.
This cue is helpful if Git isn't already installed on the system. But if the installer from Git is used to put the program on the system, updating the PATH variable can alleviate this issue. The trick is to put the path ahead of the current path the Mac will look in. This should do it:
export PATH=/usr/local/git/bin:$PATH
Comments
Post a Comment