]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/git-help.txt
Merge branch 'jk/clone-allow-bare-and-o-together'
[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]
1ce59013 11'git help' [-a|--all] [--[no-]verbose] [--[no-]external-commands] [--[no-]aliases]
dba1e539 12'git help' [[-i|--info] [-m|--man] [-w|--web]] [<command>|<doc>]
9856ea67 13'git help' [-g|--guides]
1ed4bef6 14'git help' [-c|--config]
d976c510 15'git help' [--user-interfaces]
844739ba 16'git help' [--developer-interfaces]
0f6f195b
CC
17
18DESCRIPTION
19-----------
20
dba1e539 21With no options and no '<command>' or '<doc>' given, the synopsis of the 'git'
2de9b711 22command and a list of the most commonly used Git commands are printed
0f6f195b
CC
23on the standard output.
24
bcf9626a 25If the option `--all` or `-a` is given, all available commands are
0f6f195b
CC
26printed on the standard output.
27
0371a764
PB
28If the option `--guides` or `-g` is given, a list of the
29Git concept guides is also printed on the standard output.
a133737b 30
dba1e539
ÆAB
31If a command or other documentation is given, the relevant manual page
32will be brought up. The 'man' program is used by default for this
a133737b
PO
33purpose, but this can be overridden by other options or configuration
34variables.
0f6f195b 35
91210477
RV
36If an alias is given, git shows the definition of the alias on
37standard output. To get the manual page for the aliased command, use
49cbad0e 38`git <command> --help`.
91210477 39
db5d6666 40Note that `git --help ...` is identical to `git help ...` because the
0f6f195b
CC
41former is internally converted into the latter.
42
a133737b
PO
43To display the linkgit:git[1] man page, use `git help git`.
44
45This page can be displayed with 'git help help' or `git help --help`
46
0f6f195b
CC
47OPTIONS
48-------
3240240f
SB
49-a::
50--all::
5e8068b7 51 Prints all the available commands on the standard output.
26c7d067 52
1ce59013
ÆAB
53--no-external-commands::
54 When used with `--all`, exclude the listing of external "git-*"
55 commands found in the `$PATH`.
56
57--no-aliases::
58 When used with `--all`, exclude the listing of configured
59 aliases.
60
26c7d067
NTND
61--verbose::
62 When used with `--all` print description for all recognized
63 commands. This is the default.
a133737b 64
3ac68a93
NTND
65-c::
66--config::
67 List all available configuration variables. This is a short
68 summary of the list in linkgit:git-config[1].
69
a133737b
PO
70-g::
71--guides::
9856ea67 72 Prints a list of the Git concept guides on the standard output.
0f6f195b 73
d976c510
ÆAB
74--user-interfaces::
75 Prints a list of the repository, command and file interfaces
76 documentation on the standard output.
77+
78In-repository file interfaces such as `.git/info/exclude` are
79documented here (see linkgit:gitrepository-layout[5]), as well as
80in-tree configuration such as `.mailmap` (see linkgit:gitmailmap[5]).
81+
82This section of the documentation also covers general or widespread
83user-interface conventions (e.g. linkgit:gitcli[7]), and
84pseudo-configuration such as the file-based `.git/hooks/*` interface
85described in linkgit:githooks[5].
86
844739ba
ÆAB
87--developer-interfaces::
88 Print list of file formats, protocols and other developer
89 interfaces documentation on the standard output.
90
3240240f
SB
91-i::
92--info::
b5578f33
CC
93 Display manual page for the command in the 'info' format. The
94 'info' program will be used for that purpose.
45533d26 95
3240240f
SB
96-m::
97--man::
b5578f33
CC
98 Display manual page for the command in the 'man' format. This
99 option may be used to override a value set in the
ae9f6311 100 `help.format` configuration variable.
b5578f33
CC
101+
102By default the 'man' program will be used to display the manual page,
ae9f6311 103but the `man.viewer` configuration variable may be used to choose
b8322ea8 104other display programs (see below).
70087cdb 105
3240240f
SB
106-w::
107--web::
b5578f33
CC
108 Display manual page for the command in the 'web' (HTML)
109 format. A web browser will be used for that purpose.
c07a07c5
CC
110+
111The web browser can be specified using the configuration variable
ae9f6311 112`help.browser`, or `web.browser` if the former is not set. If none of
28394787 113these config variables is set, the 'git web{litdd}browse' helper script
0b444cdb 114(called by 'git help') will pick a suitable default. See
28394787 115linkgit:git-web{litdd}browse[1] for more information about this.
c07a07c5 116
70087cdb
CC
117CONFIGURATION VARIABLES
118-----------------------
119
b8322ea8
CC
120help.format
121~~~~~~~~~~~
122
ae9f6311 123If no command-line option is passed, the `help.format` configuration
70087cdb 124variable will be checked. The following values are supported for this
06ab60c0 125variable; they make 'git help' behave as their corresponding command-
70087cdb
CC
126line option:
127
128* "man" corresponds to '-m|--man',
129* "info" corresponds to '-i|--info',
b5578f33 130* "web" or "html" correspond to '-w|--web'.
70087cdb 131
b8322ea8
CC
132help.browser, web.browser and browser.<tool>.path
133~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
134
ae9f6311 135The `help.browser`, `web.browser` and `browser.<tool>.path` will also
06ab60c0 136be checked if the 'web' format is chosen (either by command-line
70087cdb 137option or configuration variable). See '-w|--web' in the OPTIONS
28394787 138section above and linkgit:git-web{litdd}browse[1].
70087cdb 139
b8322ea8
CC
140man.viewer
141~~~~~~~~~~
142
ae9f6311 143The `man.viewer` configuration variable will be checked if the 'man'
06ab60c0 144format is chosen. The following values are currently supported:
b5578f33
CC
145
146* "man": use the 'man' program as usual,
147* "woman": use 'emacsclient' to launch the "woman" mode in emacs
ba170517 148 (this only works starting with emacsclient versions 22),
0bb64009 149* "konqueror": use 'kfmclient' to open the man page in a new konqueror
ba170517 150 tab (see 'Note about konqueror' below).
b5578f33 151
0bb64009 152Values for other tools can be used if there is a corresponding
ae9f6311 153`man.<tool>.cmd` configuration entry (see below).
0bb64009 154
ae9f6311 155Multiple values may be given to the `man.viewer` configuration
0bb64009
CC
156variable. Their corresponding programs will be tried in the order
157listed in the configuration file.
b8322ea8
CC
158
159For example, this configuration:
160
0bb64009 161------------------------------------------------
b8322ea8
CC
162 [man]
163 viewer = konqueror
164 viewer = woman
0bb64009 165------------------------------------------------
b8322ea8 166
06ab60c0 167will try to use konqueror first. But this may fail (for example, if
b8322ea8
CC
168DISPLAY is not set) and in that case emacs' woman mode will be tried.
169
5059a427 170If everything fails, or if no viewer is configured, the viewer specified
47d81b5c 171in the `GIT_MAN_VIEWER` environment variable will be tried. If that
5059a427 172fails too, the 'man' program will be tried anyway.
b8322ea8 173
7e8114c0
CC
174man.<tool>.path
175~~~~~~~~~~~~~~~
176
177You can explicitly provide a full path to your preferred man viewer by
ae9f6311 178setting the configuration variable `man.<tool>.path`. For example, you
7e8114c0 179can configure the absolute path to konqueror by setting
0b444cdb 180'man.konqueror.path'. Otherwise, 'git help' assumes the tool is
7e8114c0
CC
181available in PATH.
182
0bb64009
CC
183man.<tool>.cmd
184~~~~~~~~~~~~~~
185
ae9f6311 186When the man viewer, specified by the `man.viewer` configuration
0bb64009 187variables, is not among the supported ones, then the corresponding
ae9f6311 188`man.<tool>.cmd` configuration variable will be looked up. If this
0bb64009
CC
189variable exists then the specified tool will be treated as a custom
190command and a shell eval will be used to run the command with the man
191page passed as arguments.
192
193Note about konqueror
194~~~~~~~~~~~~~~~~~~~~
195
ae9f6311 196When 'konqueror' is specified in the `man.viewer` configuration
0bb64009
CC
197variable, we launch 'kfmclient' to try to open the man page on an
198already opened konqueror in a new tab if possible.
199
200For consistency, we also try such a trick if 'man.konqueror.path' is
68ed71b5
CB
201set to something like `A_PATH_TO/konqueror`. That means we will try to
202launch `A_PATH_TO/kfmclient` instead.
0bb64009
CC
203
204If you really want to use 'konqueror', then you can use something like
205the following:
206
207------------------------------------------------
208 [man]
209 viewer = konq
210
211 [man "konq"]
212 cmd = A_PATH_TO/konqueror
213------------------------------------------------
214
b8322ea8
CC
215Note about git config --global
216~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
217
b5578f33 218Note that all these configuration variables should probably be set
bcf9626a 219using the `--global` flag, for example like this:
70087cdb
CC
220
221------------------------------------------------
222$ git config --global help.format web
223$ git config --global web.browser firefox
224------------------------------------------------
225
226as they are probably more user specific than repository specific.
5162e697 227See linkgit:git-config[1] for more information about this.
70087cdb 228
0f6f195b
CC
229GIT
230---
9e1f0a85 231Part of the linkgit:git[1] suite