views:

219

answers:

3

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
+1  A: 

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.

Greg Hewgill
But it wont work. The installer package mentioned installs to prefix /usr/local/git, not /usr/local
Steve Folly
I edited the path in the answer so it reflects what the DMG put on my system. I think that's what Greg meant.
Ethan
+1  A: 

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

nall
To clarify. If you want git accessible from programs started from a Terminal e,g command line got then add /usr/local/got/bin to the path in your shell else if wanted from other apps e.g. from Finder then you meed to add it to your .MacOSX/environment.plist
Mark
+1  A: 

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.

Steve Folly