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

Today, I accidentally typed man git diff which should give no results, as it should, according to the manual, be interpreted as page diff in section git. However, page git-diff(1) is actually shown. How can that be? (Using man 2.5.7 as included in Ubuntu Lucid)

share|improve this question
up vote 6 down vote accepted

man(1) on Ubuntu says:

              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.  This supports the  common  pat-
              tern  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  sub-
              commands themselves.  For example:

                $ man -aw git diff

              To disable this behaviour, use the --no-subpages option.

                $ man -aw --no-subpages git diff
share|improve this answer
That's funny -- they choosed the same example. Thanks! – artistoex May 22 '10 at 11:38
The man-db implementation of man added this in 2009 apparently:… – David Röthlisberger Nov 26 '14 at 11:14

Git may have a reference for diff in git that points to git-diff.

share|improve this answer

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.