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