]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/git-help.txt
Merge git://ozlabs.org/~paulus/gitk
[thirdparty/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--------
7791a1d9 10[verse]
70087cdb 11'git help' [-a|--all|-i|--info|-m|--man|-w|--web] [COMMAND]
0f6f195b
CC
12
13DESCRIPTION
14-----------
15
16With no options and no COMMAND given, the synopsis of the 'git'
17command and a list of the most commonly used git commands are printed
18on the standard output.
19
20If the option '--all' or '-a' is given, then all available commands are
21printed on the standard output.
22
23If a git command is named, a manual page for that command is brought
45533d26 24up. The 'man' program is used by default for this purpose, but this
02ff6250 25can be overridden by other options or configuration variables.
0f6f195b 26
db5d6666 27Note that `git --help ...` is identical to `git help ...` because the
0f6f195b
CC
28former is internally converted into the latter.
29
30OPTIONS
31-------
3240240f
SB
32-a::
33--all::
0f6f195b 34 Prints all the available commands on the standard output. This
02ff6250 35 option supersedes any other option.
0f6f195b 36
3240240f
SB
37-i::
38--info::
b5578f33
CC
39 Display manual page for the command in the 'info' format. The
40 'info' program will be used for that purpose.
45533d26 41
3240240f
SB
42-m::
43--man::
b5578f33
CC
44 Display manual page for the command in the 'man' format. This
45 option may be used to override a value set in the
46 'help.format' configuration variable.
47+
48By default the 'man' program will be used to display the manual page,
49but the 'man.viewer' configuration variable may be used to choose
b8322ea8 50other display programs (see below).
70087cdb 51
3240240f
SB
52-w::
53--web::
b5578f33
CC
54 Display manual page for the command in the 'web' (HTML)
55 format. A web browser will be used for that purpose.
c07a07c5
CC
56+
57The web browser can be specified using the configuration variable
58'help.browser', or 'web.browser' if the former is not set. If none of
28394787 59these config variables is set, the 'git web{litdd}browse' helper script
0b444cdb 60(called by 'git help') will pick a suitable default. See
28394787 61linkgit:git-web{litdd}browse[1] for more information about this.
c07a07c5 62
70087cdb
CC
63CONFIGURATION VARIABLES
64-----------------------
65
b8322ea8
CC
66help.format
67~~~~~~~~~~~
68
70087cdb
CC
69If no command line option is passed, the 'help.format' configuration
70variable will be checked. The following values are supported for this
0b444cdb 71variable; they make 'git help' behave as their corresponding command
70087cdb
CC
72line option:
73
74* "man" corresponds to '-m|--man',
75* "info" corresponds to '-i|--info',
b5578f33 76* "web" or "html" correspond to '-w|--web'.
70087cdb 77
b8322ea8
CC
78help.browser, web.browser and browser.<tool>.path
79~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
80
70087cdb 81The 'help.browser', 'web.browser' and 'browser.<tool>.path' will also
02ff6250 82be checked if the 'web' format is chosen (either by command line
70087cdb 83option or configuration variable). See '-w|--web' in the OPTIONS
28394787 84section above and linkgit:git-web{litdd}browse[1].
70087cdb 85
b8322ea8
CC
86man.viewer
87~~~~~~~~~~
88
b5578f33 89The 'man.viewer' config variable will be checked if the 'man' format
0bb64009 90is chosen. The following values are currently supported:
b5578f33
CC
91
92* "man": use the 'man' program as usual,
93* "woman": use 'emacsclient' to launch the "woman" mode in emacs
94(this only works starting with emacsclient versions 22),
0bb64009
CC
95* "konqueror": use 'kfmclient' to open the man page in a new konqueror
96tab (see 'Note about konqueror' below).
b5578f33 97
0bb64009
CC
98Values for other tools can be used if there is a corresponding
99'man.<tool>.cmd' configuration entry (see below).
100
101Multiple values may be given to the 'man.viewer' configuration
102variable. Their corresponding programs will be tried in the order
103listed in the configuration file.
b8322ea8
CC
104
105For example, this configuration:
106
0bb64009 107------------------------------------------------
b8322ea8
CC
108 [man]
109 viewer = konqueror
110 viewer = woman
0bb64009 111------------------------------------------------
b8322ea8
CC
112
113will try to use konqueror first. But this may fail (for example if
114DISPLAY is not set) and in that case emacs' woman mode will be tried.
115
5059a427
RF
116If everything fails, or if no viewer is configured, the viewer specified
117in the GIT_MAN_VIEWER environment variable will be tried. If that
118fails too, the 'man' program will be tried anyway.
b8322ea8 119
7e8114c0
CC
120man.<tool>.path
121~~~~~~~~~~~~~~~
122
123You can explicitly provide a full path to your preferred man viewer by
124setting the configuration variable 'man.<tool>.path'. For example, you
125can configure the absolute path to konqueror by setting
0b444cdb 126'man.konqueror.path'. Otherwise, 'git help' assumes the tool is
7e8114c0
CC
127available in PATH.
128
0bb64009
CC
129man.<tool>.cmd
130~~~~~~~~~~~~~~
131
132When the man viewer, specified by the 'man.viewer' configuration
133variables, is not among the supported ones, then the corresponding
134'man.<tool>.cmd' configuration variable will be looked up. If this
135variable exists then the specified tool will be treated as a custom
136command and a shell eval will be used to run the command with the man
137page passed as arguments.
138
139Note about konqueror
140~~~~~~~~~~~~~~~~~~~~
141
142When 'konqueror' is specified in the 'man.viewer' configuration
143variable, we launch 'kfmclient' to try to open the man page on an
144already opened konqueror in a new tab if possible.
145
146For consistency, we also try such a trick if 'man.konqueror.path' is
147set to something like 'A_PATH_TO/konqueror'. That means we will try to
148launch 'A_PATH_TO/kfmclient' instead.
149
150If you really want to use 'konqueror', then you can use something like
151the following:
152
153------------------------------------------------
154 [man]
155 viewer = konq
156
157 [man "konq"]
158 cmd = A_PATH_TO/konqueror
159------------------------------------------------
160
b8322ea8
CC
161Note about git config --global
162~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
163
b5578f33
CC
164Note that all these configuration variables should probably be set
165using the '--global' flag, for example like this:
70087cdb
CC
166
167------------------------------------------------
168$ git config --global help.format web
169$ git config --global web.browser firefox
170------------------------------------------------
171
172as they are probably more user specific than repository specific.
5162e697 173See linkgit:git-config[1] for more information about this.
70087cdb 174
0f6f195b
CC
175GIT
176---
9e1f0a85 177Part of the linkgit:git[1] suite