Merge branch 'cc/browser'
[git/git.git] / Documentation / git-help.txt
CommitLineData
0f6f195b 1git-help(1)
dada0c12 2===========
0f6f195b
CC
3
4NAME
5----
6git-help - display help information about git
7
8SYNOPSIS
9--------
70087cdb 10'git help' [-a|--all|-i|--info|-m|--man|-w|--web] [COMMAND]
0f6f195b
CC
11
12DESCRIPTION
13-----------
14
15With no options and no COMMAND given, the synopsis of the 'git'
16command and a list of the most commonly used git commands are printed
17on the standard output.
18
19If the option '--all' or '-a' is given, then all available commands are
20printed on the standard output.
21
22If a git command is named, a manual page for that command is brought
45533d26 23up. The 'man' program is used by default for this purpose, but this
02ff6250 24can be overridden by other options or configuration variables.
0f6f195b
CC
25
26Note that 'git --help ...' is identical as 'git help ...' because the
27former is internally converted into the latter.
28
29OPTIONS
30-------
31-a|--all::
0f6f195b 32 Prints all the available commands on the standard output. This
02ff6250 33 option supersedes any other option.
0f6f195b 34
45533d26
CC
35-i|--info::
36 Use the 'info' program to display the manual page, instead of
37 the 'man' program that is used by default.
38
70087cdb
CC
39-m|--man::
40 Use the 'man' program to display the manual page. This may be
41 used to override a value set in the 'help.format'
42 configuration variable.
43
c07a07c5
CC
44-w|--web::
45 Use a web browser to display the HTML manual page, instead of
46 the 'man' program that is used by default.
47+
48The web browser can be specified using the configuration variable
49'help.browser', or 'web.browser' if the former is not set. If none of
5884f1fe 50these config variables is set, the 'git-web--browse' helper script
cb45f83c
CC
51(called by 'git-help') will pick a suitable default. See
52linkgit:git-web--browse[1] for more information about this.
c07a07c5 53
70087cdb
CC
54CONFIGURATION VARIABLES
55-----------------------
56
57If no command line option is passed, the 'help.format' configuration
58variable will be checked. The following values are supported for this
59variable; they make 'git-help' behave as their corresponding command
60line option:
61
62* "man" corresponds to '-m|--man',
63* "info" corresponds to '-i|--info',
64* "web" or "html" correspond to '-w|--web',
65
66The 'help.browser', 'web.browser' and 'browser.<tool>.path' will also
02ff6250 67be checked if the 'web' format is chosen (either by command line
70087cdb 68option or configuration variable). See '-w|--web' in the OPTIONS
cb45f83c 69section above and linkgit:git-web--browse[1].
70087cdb
CC
70
71Note that these configuration variables should probably be set using
72the '--global' flag, for example like this:
73
74------------------------------------------------
75$ git config --global help.format web
76$ git config --global web.browser firefox
77------------------------------------------------
78
79as they are probably more user specific than repository specific.
5162e697 80See linkgit:git-config[1] for more information about this.
70087cdb 81
0f6f195b
CC
82Author
83------
84Written by Junio C Hamano <gitster@pobox.com> and the git-list
85<git@vger.kernel.org>.
86
87Documentation
88-------------
5162e697 89Initial documentation was part of the linkgit:git[7] man page.
0f6f195b
CC
90Christian Couder <chriscool@tuxfamily.org> extracted and rewrote it a
91little. Maintenance is done by the git-list <git@vger.kernel.org>.
92
93GIT
94---
5162e697 95Part of the linkgit:git[7] suite