Git fork
1git-help(1)
2===========
3
4NAME
5----
6git-help - Display help information about Git
7
8SYNOPSIS
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>|<doc>]
13'git help' [-g|--guides]
14'git help' [-c|--config]
15'git help' [--user-interfaces]
16'git help' [--developer-interfaces]
17
18DESCRIPTION
19-----------
20
21With no options and no '<command>' or '<doc>' given, the synopsis of the 'git'
22command and a list of the most commonly used Git commands are printed
23on the standard output.
24
25If the option `--all` or `-a` is given, all available commands are
26printed on the standard output.
27
28If the option `--guides` or `-g` is given, a list of the
29Git concept guides is also printed on the standard output.
30
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
33purpose, but this can be overridden by other options or configuration
34variables.
35
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
38`git <command> --help`.
39
40Note that `git --help ...` is identical to `git help ...` because the
41former is internally converted into the latter.
42
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
47OPTIONS
48-------
49-a::
50--all::
51 Print all the available commands on the standard output.
52
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
61--verbose::
62 When used with `--all`, print description for all recognized
63 commands. This is the default.
64
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
70-g::
71--guides::
72 Print a list of the Git concept guides on the standard output.
73
74--user-interfaces::
75 Print 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
87--developer-interfaces::
88 Print a list of file formats, protocols and other developer
89 interfaces documentation on the standard output.
90
91-i::
92--info::
93 Display manual page for the command in the 'info' format. The
94 'info' program will be used for that purpose.
95
96-m::
97--man::
98 Display manual page for the command in the 'man' format. This
99 option may be used to override a value set in the
100 `help.format` configuration variable.
101+
102By default the 'man' program will be used to display the manual page,
103but the `man.viewer` configuration variable may be used to choose
104other display programs (see below).
105
106-w::
107--web::
108 Display manual page for the command in the 'web' (HTML)
109 format. A web browser will be used for that purpose.
110+
111The web browser can be specified using the configuration variable
112`help.browser`, or `web.browser` if the former is not set. If neither of
113these config variables is set, the 'git web{litdd}browse' helper script
114(called by 'git help') will pick a suitable default. See
115linkgit:git-web{litdd}browse[1] for more information about this.
116
117CONFIGURATION VARIABLES
118-----------------------
119
120help.format
121~~~~~~~~~~~
122
123If no command-line option is passed, the `help.format` configuration
124variable will be checked. The following values are supported for this
125variable; they make 'git help' behave as their corresponding command-
126line option:
127
128* "man" corresponds to '-m|--man',
129* "info" corresponds to '-i|--info',
130* "web" or "html" correspond to '-w|--web'.
131
132help.browser, web.browser, and browser.<tool>.path
133~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
134
135The `help.browser`, `web.browser` and `browser.<tool>.path` will also
136be checked if the 'web' format is chosen (either by command-line
137option or configuration variable). See '-w|--web' in the OPTIONS
138section above and linkgit:git-web{litdd}browse[1].
139
140man.viewer
141~~~~~~~~~~
142
143The `man.viewer` configuration variable will be checked if the 'man'
144format is chosen. The following values are currently supported:
145
146* "man": use the 'man' program as usual,
147* "woman": use 'emacsclient' to launch the "woman" mode in emacs
148 (this only works starting with emacsclient versions 22),
149* "konqueror": use 'kfmclient' to open the man page in a new konqueror
150 tab (see 'Note about konqueror' below).
151
152Values for other tools can be used if there is a corresponding
153`man.<tool>.cmd` configuration entry (see below).
154
155Multiple values may be given to the `man.viewer` configuration
156variable. Their corresponding programs will be tried in the order
157listed in the configuration file.
158
159For example, this configuration:
160
161------------------------------------------------
162 [man]
163 viewer = konqueror
164 viewer = woman
165------------------------------------------------
166
167will try to use konqueror first. But this may fail (for example, if
168DISPLAY is not set) and in that case emacs' woman mode will be tried.
169
170If everything fails, or if no viewer is configured, the viewer specified
171in the `GIT_MAN_VIEWER` environment variable will be tried. If that
172fails too, the 'man' program will be tried anyway.
173
174man.<tool>.path
175~~~~~~~~~~~~~~~
176
177You can explicitly provide a full path to your preferred man viewer by
178setting the configuration variable `man.<tool>.path`. For example, you
179can configure the absolute path to konqueror by setting
180'man.konqueror.path'. Otherwise, 'git help' assumes the tool is
181available in PATH.
182
183man.<tool>.cmd
184~~~~~~~~~~~~~~
185
186When the man viewer, specified by the `man.viewer` configuration
187variables, is not among the supported ones, then the corresponding
188`man.<tool>.cmd` configuration variable will be looked up. If this
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
196When 'konqueror' is specified in the `man.viewer` configuration
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
201set to something like `A_PATH_TO/konqueror`. That means we will try to
202launch `A_PATH_TO/kfmclient` instead.
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
215Note about git config --global
216~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
217
218Note that all these configuration variables should probably be set
219using the `--global` flag, for example like this:
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.
227See linkgit:git-config[1] for more information about this.
228
229GIT
230---
231Part of the linkgit:git[1] suite