Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed Git via homebrew, on OSX 10.8, with an already existing version of Git. The new version wouldn't show up, so I renamed the old git files (git, gitk etc...)in /usr/bin , to *-old. Now the new git shows up, but the man files still belong to the old git version.

The new git installed via homebrew is located in /usr/local/bin/git and its man files are in /usr/local/Cellar/ for some reason. Some of the other packages I have installed via homebrew such as autoconf seem to have been picked up by man while others have not, such as apple-gcc42, and git.

Question: How do I override the old git man files and replace them with the new ones?

Question 2: are there any other dependencies OSX that I should be aware of that could be broken by changing the file like this?

share|improve this question

First, make sure /usr/local/bin appears before /usr/bin in your PATH variable.

$ echo $PATH

If not, add the following to your .bash_profile (you probably don't need to, I think homebrew does this when you install it):


Also in .bash_profile, add /usr/local/Cellar to MANPATH:


(Note: it may be a longer path you need to add, like /usr/local/Cellar/git/1.8/share/man. Check which directory actually contains the man1 directory containing the various git man pages.)

If you still need to see, e.g., an old git man page, you can pass a full path to the man command:

$ man git  # Finds page under /usr/local/Cellar
$ man /usr/share/man/man1/git.1   # Original git man page
share|improve this answer
It works, I like it very much. I just move the /usr/local/bin to the begin of the $PATH, the man pages change automatically, Mac OS X mountain lion. – Charles Sep 26 '13 at 16:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.