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