How does man find git's subcommand manpages?

On my linux system, I can do “man git log” (note the space), and this will show me the manpage for git-log(1) (with a dash), as expected.

On my MacOSX machine, “man git log” only shows the manual page for git(1).

  • git clean: What does “Would not remove” mean?
  • Ignore any blank space or line break in git-diff
  • Can I use a scripted commit template for git?
  • How to disable chome's “Search GitHub” feature?
  • How to find/identify large files/commits in Git history?
  • rails app in development doesn't show up on heroku
  • How does the linux man know that the two arguments “git” and “log” should be combined to find the “git-log” manpage? How would I get the same result in OSX?

  • Azure website - Select website project from solution to deploy
  • Deploy from bitbucket to live server
  • I can't commit (your branch is up-to-date with 'origin/master')
  • Git clone --no-checkout again
  • “git filter-branch” successfully used to change committer/author, but changes don't reflect on github
  • git flow branching model branching
  • One Solution collect form web for “How does man find git's subcommand manpages?”

    This is a feature of the particular implementation of man used on many Linux systems. Referring to the documentation (for man), it is mentioned in the description of the --no-subpages option:

    --no-subpages

    By default, man will try to interpret pairs of manual page
    names given on the command line as equivalent to a single
    manual page name containing a hyphen or an underscore. This
    supports the common pattern of programs that implement a
    number of subcommands, allowing them to provide manual pages
    for each that can be accessed using similar syntax as would be
    used to invoke the subcommands themselves.

    Other implementations of man can do different things. For instance (not well documented, but there if you study it), a quick check for man git status on OSX El Capitan shows it tries to find a manual page for status. However, man git-status gives a manual page.

    Git Baby is a git and github fan, let's start git clone.