I just installed git 1.6.4.4 after downloading a DMG package from here .
I now have /usr/local/git
. But it isn't in my PATH. So I need to add it.
My question is, should I add just /usr/local/git/bin
, or do I also need to add one or more of these other directories?
$ cd /usr/local/git/
$ ls -al
total 0
drwxr-xr-x 3 joefleen wheel 102 Sep 17 12:22 Library
drwxr-xr-x 9 root wheel 306 Sep 27 11:09 bin
drwxr-xr-x 3 root wheel 102 Sep 17 12:22 contrib
drwxr-xr-x 3 root wheel 102 Sep 17 12:22 lib
drwxr-xr-x 3 root wheel 102 Sep 17 12:22 libexec
drwxr-xr-x 6 root wheel 204 Sep 17 12:22 share
No, all you need to add is /usr/local/git/bin
. You can test this by running it directly:
/usr/local/git/bin/git
and see whether it works.
The short answer is what Greg says above. However, in that DMG there is a shell script for updating your PATH for non-terminal programs. That is also worth running.
It simply adds /usr/local/git/bin to your .MacOSX/environment.plist
Others have mentioned updating your PATH environment variable, but you may also want to update your MANPATH variable as well to get access to the man pages.
Add /usr/local/git/share/man
to it.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.