1 <?xml version="1.0" encoding="UTF-8"?>
\r
2 <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
\r
4 <article lang="en" id="git-help(1)">
\r
6 <title>git-help(1)</title>
\r
8 <primary>git-help(1)</primary>
\r
11 <simplesect id="_name">
\r
13 <simpara>git-help - display help information about git</simpara>
\r
15 <simplesect id="_synopsis">
\r
16 <title>SYNOPSIS</title>
\r
17 <simpara><emphasis>git help</emphasis> [-a|--all|-i|--info|-m|--man|-w|--web] [COMMAND]</simpara>
\r
19 <simplesect id="_description">
\r
20 <title>DESCRIPTION</title>
\r
21 <simpara>With no options and no COMMAND given, the synopsis of the <emphasis>git</emphasis>
\r
22 command and a list of the most commonly used git commands are printed
\r
23 on the standard output.</simpara>
\r
24 <simpara>If the option <emphasis>--all</emphasis> or <emphasis>-a</emphasis> is given, then all available commands are
\r
25 printed on the standard output.</simpara>
\r
26 <simpara>If a git command is named, a manual page for that command is brought
\r
27 up. The <emphasis>man</emphasis> program is used by default for this purpose, but this
\r
28 can be overridden by other options or configuration variables.</simpara>
\r
29 <simpara>Note that <literal>git --help …</literal> is identical to <literal>git help …</literal> because the
\r
30 former is internally converted into the latter.</simpara>
\r
32 <simplesect id="_options">
\r
33 <title>OPTIONS</title>
\r
44 Prints all the available commands on the standard output. This
\r
45 option supersedes any other option.
\r
58 Display manual page for the command in the <emphasis>info</emphasis> format. The
\r
59 <emphasis>info</emphasis> program will be used for that purpose.
\r
72 Display manual page for the command in the <emphasis>man</emphasis> format. This
\r
73 option may be used to override a value set in the
\r
74 <emphasis>help.format</emphasis> configuration variable.
\r
76 <simpara>By default the <emphasis>man</emphasis> program will be used to display the manual page,
\r
77 but the <emphasis>man.viewer</emphasis> configuration variable may be used to choose
\r
78 other display programs (see below).</simpara>
\r
90 Display manual page for the command in the <emphasis>web</emphasis> (HTML)
\r
91 format. A web browser will be used for that purpose.
\r
93 <simpara>The web browser can be specified using the configuration variable
\r
94 <emphasis>help.browser</emphasis>, or <emphasis>web.browser</emphasis> if the former is not set. If none of
\r
95 these config variables is set, the <emphasis>git-web—browse</emphasis> helper script
\r
96 (called by <emphasis>git-help</emphasis>) will pick a suitable default. See
\r
97 <xref linkend="git-web—browse(1)"/> for more information about this.</simpara>
\r
102 <simplesect id="_configuration_variables">
\r
103 <title>CONFIGURATION VARIABLES</title>
\r
104 <simplesect id="_help_format">
\r
105 <title>help.format</title>
\r
106 <simpara>If no command line option is passed, the <emphasis>help.format</emphasis> configuration
\r
107 variable will be checked. The following values are supported for this
\r
108 variable; they make <emphasis>git-help</emphasis> behave as their corresponding command
\r
109 line option:</simpara>
\r
113 "man" corresponds to <emphasis>-m|--man</emphasis>,
\r
118 "info" corresponds to <emphasis>-i|--info</emphasis>,
\r
123 "web" or "html" correspond to <emphasis>-w|--web</emphasis>.
\r
128 <simplesect id="_help_browser_web_browser_and_browser_lt_tool_gt_path">
\r
129 <title>help.browser, web.browser and browser.<tool>.path</title>
\r
130 <simpara>The <emphasis>help.browser</emphasis>, <emphasis>web.browser</emphasis> and <emphasis>browser.<tool>.path</emphasis> will also
\r
131 be checked if the <emphasis>web</emphasis> format is chosen (either by command line
\r
132 option or configuration variable). See <emphasis>-w|--web</emphasis> in the OPTIONS
\r
133 section above and <xref linkend="git-web—browse(1)"/>.</simpara>
\r
135 <simplesect id="_man_viewer">
\r
136 <title>man.viewer</title>
\r
137 <simpara>The <emphasis>man.viewer</emphasis> config variable will be checked if the <emphasis>man</emphasis> format
\r
138 is chosen. The following values are currently supported:</simpara>
\r
142 "man": use the <emphasis>man</emphasis> program as usual,
\r
147 "woman": use <emphasis>emacsclient</emphasis> to launch the "woman" mode in emacs
\r
148 (this only works starting with emacsclient versions 22),
\r
153 "konqueror": use <emphasis>kfmclient</emphasis> to open the man page in a new konqueror
\r
154 tab (see <emphasis>Note about konqueror</emphasis> below).
\r
158 <simpara>Values for other tools can be used if there is a corresponding
\r
159 <emphasis>man.<tool>.cmd</emphasis> configuration entry (see below).</simpara>
\r
160 <simpara>Multiple values may be given to the <emphasis>man.viewer</emphasis> configuration
\r
161 variable. Their corresponding programs will be tried in the order
\r
162 listed in the configuration file.</simpara>
\r
163 <simpara>For example, this configuration:</simpara>
\r
164 <literallayout> [man]
\r
166 viewer = woman</literallayout>
\r
167 <simpara>will try to use konqueror first. But this may fail (for example if
\r
168 DISPLAY is not set) and in that case emacs' woman mode will be tried.</simpara>
\r
169 <simpara>If everything fails, or if no viewer is configured, the viewer specified
\r
170 in the GIT_MAN_VIEWER environment variable will be tried. If that
\r
171 fails too, the <emphasis>man</emphasis> program will be tried anyway.</simpara>
\r
173 <simplesect id="_man_lt_tool_gt_path">
\r
174 <title>man.<tool>.path</title>
\r
175 <simpara>You can explicitly provide a full path to your preferred man viewer by
\r
176 setting the configuration variable <emphasis>man.<tool>.path</emphasis>. For example, you
\r
177 can configure the absolute path to konqueror by setting
\r
178 <emphasis>man.konqueror.path</emphasis>. Otherwise, <emphasis>git-help</emphasis> assumes the tool is
\r
179 available in PATH.</simpara>
\r
181 <simplesect id="_man_lt_tool_gt_cmd">
\r
182 <title>man.<tool>.cmd</title>
\r
183 <simpara>When the man viewer, specified by the <emphasis>man.viewer</emphasis> configuration
\r
184 variables, is not among the supported ones, then the corresponding
\r
185 <emphasis>man.<tool>.cmd</emphasis> configuration variable will be looked up. If this
\r
186 variable exists then the specified tool will be treated as a custom
\r
187 command and a shell eval will be used to run the command with the man
\r
188 page passed as arguments.</simpara>
\r
190 <simplesect id="_note_about_konqueror">
\r
191 <title>Note about konqueror</title>
\r
192 <simpara>When <emphasis>konqueror</emphasis> is specified in the <emphasis>man.viewer</emphasis> configuration
\r
193 variable, we launch <emphasis>kfmclient</emphasis> to try to open the man page on an
\r
194 already opened konqueror in a new tab if possible.</simpara>
\r
195 <simpara>For consistency, we also try such a trick if <emphasis>man.konqueror.path</emphasis> is
\r
196 set to something like <emphasis>A_PATH_TO/konqueror</emphasis>. That means we will try to
\r
197 launch <emphasis>A_PATH_TO/kfmclient</emphasis> instead.</simpara>
\r
198 <simpara>If you really want to use <emphasis>konqueror</emphasis>, then you can use something like
\r
199 the following:</simpara>
\r
200 <literallayout> [man]
\r
204 cmd = A_PATH_TO/konqueror</literallayout>
\r
206 <simplesect id="_note_about_git_config_global">
\r
207 <title>Note about git config --global</title>
\r
208 <simpara>Note that all these configuration variables should probably be set
\r
209 using the <emphasis>--global</emphasis> flag, for example like this:</simpara>
\r
210 <literallayout>$ git config --global help.format web
\r
211 $ git config --global web.browser firefox</literallayout>
\r
212 <simpara>as they are probably more user specific than repository specific.
\r
213 See <xref linkend="git-config(1)"/> for more information about this.</simpara>
\r
216 <simplesect id="_author">
\r
217 <title>Author</title>
\r
218 <simpara>Written by Junio C Hamano <<ulink url="mailto:gitster@pobox.com">gitster@pobox.com</ulink>> and the git-list
\r
219 <<ulink url="mailto:git@vger.kernel.org">git@vger.kernel.org</ulink>>.</simpara>
\r
221 <simplesect id="_documentation">
\r
222 <title>Documentation</title>
\r
223 <simpara>Initial documentation was part of the <xref linkend="git(1)"/> man page.
\r
224 Christian Couder <<ulink url="mailto:chriscool@tuxfamily.org">chriscool@tuxfamily.org</ulink>> extracted and rewrote it a
\r
225 little. Maintenance is done by the git-list <<ulink url="mailto:git@vger.kernel.org">git@vger.kernel.org</ulink>>.</simpara>
\r
227 <simplesect id="_git">
\r
229 <simpara>Part of the <xref linkend="git(1)"/> suite</simpara>
\r