summaryrefslogtreecommitdiffstats
path: root/man1/git-help.1
blob: e01df547132088dd0575f2fc36a9b8108e361f94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
'\" t
.\"     Title: git-help
.\"    Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
.\"      Date: 2024-04-22
.\"    Manual: Git Manual
.\"    Source: Git 2.45.0.rc0.3.g00e10ef10e
.\"  Language: English
.\"
.TH "GIT\-HELP" "1" "2024\-04\-22" "Git 2\&.45\&.0\&.rc0\&.3\&.g00" "Git Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
git-help \- Display help information about Git
.SH "SYNOPSIS"
.sp
.nf
\fIgit help\fR [\-a|\-\-all] [\-\-[no\-]verbose] [\-\-[no\-]external\-commands] [\-\-[no\-]aliases]
\fIgit help\fR [[\-i|\-\-info] [\-m|\-\-man] [\-w|\-\-web]] [<command>|<doc>]
\fIgit help\fR [\-g|\-\-guides]
\fIgit help\fR [\-c|\-\-config]
\fIgit help\fR [\-\-user\-interfaces]
\fIgit help\fR [\-\-developer\-interfaces]
.fi
.sp
.SH "DESCRIPTION"
.sp
With no options and no \fI<command>\fR or \fI<doc>\fR given, the synopsis of the \fIgit\fR command and a list of the most commonly used Git commands are printed on the standard output\&.
.sp
If the option \fB\-\-all\fR or \fB\-a\fR is given, all available commands are printed on the standard output\&.
.sp
If the option \fB\-\-guides\fR or \fB\-g\fR is given, a list of the Git concept guides is also printed on the standard output\&.
.sp
If a command or other documentation is given, the relevant manual page will be brought up\&. The \fIman\fR program is used by default for this purpose, but this can be overridden by other options or configuration variables\&.
.sp
If an alias is given, git shows the definition of the alias on standard output\&. To get the manual page for the aliased command, use \fBgit <command> \-\-help\fR\&.
.sp
Note that \fBgit \-\-help \&.\&.\&.\fR is identical to \fBgit help \&.\&.\&.\fR because the former is internally converted into the latter\&.
.sp
To display the \fBgit\fR(1) man page, use \fBgit help git\fR\&.
.sp
This page can be displayed with \fIgit help help\fR or \fBgit help \-\-help\fR\&.
.SH "OPTIONS"
.PP
\-a, \-\-all
.RS 4
Print all the available commands on the standard output\&.
.RE
.PP
\-\-no\-external\-commands
.RS 4
When used with
\fB\-\-all\fR, exclude the listing of external "git\-*" commands found in the
\fB$PATH\fR\&.
.RE
.PP
\-\-no\-aliases
.RS 4
When used with
\fB\-\-all\fR, exclude the listing of configured aliases\&.
.RE
.PP
\-\-verbose
.RS 4
When used with
\fB\-\-all\fR, print description for all recognized commands\&. This is the default\&.
.RE
.PP
\-c, \-\-config
.RS 4
List all available configuration variables\&. This is a short summary of the list in
\fBgit-config\fR(1)\&.
.RE
.PP
\-g, \-\-guides
.RS 4
Print a list of the Git concept guides on the standard output\&.
.RE
.PP
\-\-user\-interfaces
.RS 4
Print a list of the repository, command and file interfaces documentation on the standard output\&.
.sp
In\-repository file interfaces such as
\fB\&.git/info/exclude\fR
are documented here (see
\fBgitrepository-layout\fR(5)), as well as in\-tree configuration such as
\fB\&.mailmap\fR
(see
\fBgitmailmap\fR(5))\&.
.sp
This section of the documentation also covers general or widespread user\-interface conventions (e\&.g\&.
\fBgitcli\fR(7)), and pseudo\-configuration such as the file\-based
\fB\&.git/hooks/*\fR
interface described in
\fBgithooks\fR(5)\&.
.RE
.PP
\-\-developer\-interfaces
.RS 4
Print a list of file formats, protocols and other developer interfaces documentation on the standard output\&.
.RE
.PP
\-i, \-\-info
.RS 4
Display manual page for the command in the
\fIinfo\fR
format\&. The
\fIinfo\fR
program will be used for that purpose\&.
.RE
.PP
\-m, \-\-man
.RS 4
Display manual page for the command in the
\fIman\fR
format\&. This option may be used to override a value set in the
\fBhelp\&.format\fR
configuration variable\&.
.sp
By default the
\fIman\fR
program will be used to display the manual page, but the
\fBman\&.viewer\fR
configuration variable may be used to choose other display programs (see below)\&.
.RE
.PP
\-w, \-\-web
.RS 4
Display manual page for the command in the
\fIweb\fR
(HTML) format\&. A web browser will be used for that purpose\&.
.sp
The web browser can be specified using the configuration variable
\fBhelp\&.browser\fR, or
\fBweb\&.browser\fR
if the former is not set\&. If neither of these config variables is set, the
\fIgit web\-\-browse\fR
helper script (called by
\fIgit help\fR) will pick a suitable default\&. See
\fBgit-web--browse\fR(1)
for more information about this\&.
.RE
.SH "CONFIGURATION VARIABLES"
.SS "help\&.format"
.sp
If no command\-line option is passed, the \fBhelp\&.format\fR configuration variable will be checked\&. The following values are supported for this variable; they make \fIgit help\fR behave as their corresponding command\- line option:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
"man" corresponds to
\fI\-m|\-\-man\fR,
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
"info" corresponds to
\fI\-i|\-\-info\fR,
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
"web" or "html" correspond to
\fI\-w|\-\-web\fR\&.
.RE
.SS "help\&.browser, web\&.browser, and browser\&.<tool>\&.path"
.sp
The \fBhelp\&.browser\fR, \fBweb\&.browser\fR and \fBbrowser\&.<tool>\&.path\fR will also be checked if the \fIweb\fR format is chosen (either by command\-line option or configuration variable)\&. See \fI\-w|\-\-web\fR in the OPTIONS section above and \fBgit-web--browse\fR(1)\&.
.SS "man\&.viewer"
.sp
The \fBman\&.viewer\fR configuration variable will be checked if the \fIman\fR format is chosen\&. The following values are currently supported:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
"man": use the
\fIman\fR
program as usual,
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
"woman": use
\fIemacsclient\fR
to launch the "woman" mode in emacs (this only works starting with emacsclient versions 22),
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
"konqueror": use
\fIkfmclient\fR
to open the man page in a new konqueror tab (see
\fINote about konqueror\fR
below)\&.
.RE
.sp
Values for other tools can be used if there is a corresponding \fBman\&.<tool>\&.cmd\fR configuration entry (see below)\&.
.sp
Multiple values may be given to the \fBman\&.viewer\fR configuration variable\&. Their corresponding programs will be tried in the order listed in the configuration file\&.
.sp
For example, this configuration:
.sp
.if n \{\
.RS 4
.\}
.nf
        [man]
                viewer = konqueror
                viewer = woman
.fi
.if n \{\
.RE
.\}
.sp
.sp
will try to use konqueror first\&. But this may fail (for example, if DISPLAY is not set) and in that case emacs\*(Aq woman mode will be tried\&.
.sp
If everything fails, or if no viewer is configured, the viewer specified in the \fBGIT_MAN_VIEWER\fR environment variable will be tried\&. If that fails too, the \fIman\fR program will be tried anyway\&.
.SS "man\&.<tool>\&.path"
.sp
You can explicitly provide a full path to your preferred man viewer by setting the configuration variable \fBman\&.<tool>\&.path\fR\&. For example, you can configure the absolute path to konqueror by setting \fIman\&.konqueror\&.path\fR\&. Otherwise, \fIgit help\fR assumes the tool is available in PATH\&.
.SS "man\&.<tool>\&.cmd"
.sp
When the man viewer, specified by the \fBman\&.viewer\fR configuration variables, is not among the supported ones, then the corresponding \fBman\&.<tool>\&.cmd\fR configuration variable will be looked up\&. If this variable exists then the specified tool will be treated as a custom command and a shell eval will be used to run the command with the man page passed as arguments\&.
.SS "Note about konqueror"
.sp
When \fIkonqueror\fR is specified in the \fBman\&.viewer\fR configuration variable, we launch \fIkfmclient\fR to try to open the man page on an already opened konqueror in a new tab if possible\&.
.sp
For consistency, we also try such a trick if \fIman\&.konqueror\&.path\fR is set to something like \fBA_PATH_TO/konqueror\fR\&. That means we will try to launch \fBA_PATH_TO/kfmclient\fR instead\&.
.sp
If you really want to use \fIkonqueror\fR, then you can use something like the following:
.sp
.if n \{\
.RS 4
.\}
.nf
        [man]
                viewer = konq

        [man "konq"]
                cmd = A_PATH_TO/konqueror
.fi
.if n \{\
.RE
.\}
.sp
.SS "Note about git config \-\-global"
.sp
Note that all these configuration variables should probably be set using the \fB\-\-global\fR flag, for example like this:
.sp
.if n \{\
.RS 4
.\}
.nf
$ git config \-\-global help\&.format web
$ git config \-\-global web\&.browser firefox
.fi
.if n \{\
.RE
.\}
.sp
.sp
as they are probably more user specific than repository specific\&. See \fBgit-config\fR(1) for more information about this\&.
.SH "GIT"
.sp
Part of the \fBgit\fR(1) suite