Search code examples
gitmacosmanpage

How do I install the Git man pages on OS X?


I installed Git via the Mac OS X link here http://git-scm.com/download

After installing it, I try the following in the Terminal:

$ git help fetch
$ git help remote
$ man git
$ man git-fetch

However, I get the message No manual entry for git-<subcommand>. How do I install the man pages for Git? I have the same problem as explained here, but kernel.org is down so it doesn't help much.


Solution

  • Found it.

    $ cd /usr/local/git/share/man
    $ sudo git clone http://git.kernel.org/pub/scm/git/git-manpages.git
    

    Then in .bash_profile, add the following line:

    export MANPATH="${MANPATH}:/usr/local/git/share/man/git-manpages"