updated git doc
[TortoiseGit.git] / doc / source / en / TortoiseGit / git_doc / git-help.xml
blob0e6f190b36a20dca81580f5f4dd674267f7df259
1 <?xml version="1.0" encoding="UTF-8"?>\r
2 <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">\r
3 \r
4 <article lang="en" id="git-help(1)">\r
5 <articleinfo>\r
6     <title>git-help(1)</title>\r
7 <indexterm>\r
8 <primary>git-help(1)</primary>\r
9 </indexterm>\r
10 </articleinfo>\r
11 <simplesect id="_name">\r
12 <title>NAME</title>\r
13 <simpara>git-help - display help information about git</simpara>\r
14 </simplesect>\r
15 <simplesect id="_synopsis">\r
16 <title>SYNOPSIS</title>\r
17 <blockquote>\r
18 <literallayout><emphasis>git help</emphasis> [-a|--all|-i|--info|-m|--man|-w|--web] [COMMAND]</literallayout>\r
19 </blockquote>\r
20 </simplesect>\r
21 <simplesect id="_description">\r
22 <title>DESCRIPTION</title>\r
23 <simpara>With no options and no COMMAND given, the synopsis of the <emphasis>git</emphasis>\r
24 command and a list of the most commonly used git commands are printed\r
25 on the standard output.</simpara>\r
26 <simpara>If the option <emphasis>--all</emphasis> or <emphasis>-a</emphasis> is given, then all available commands are\r
27 printed on the standard output.</simpara>\r
28 <simpara>If a git command is named, a manual page for that command is brought\r
29 up. The <emphasis>man</emphasis> program is used by default for this purpose, but this\r
30 can be overridden by other options or configuration variables.</simpara>\r
31 <simpara>Note that <emphasis>git --help ...</emphasis> is identical to <emphasis>git help ...</emphasis> because the\r
32 former is internally converted into the latter.</simpara>\r
33 </simplesect>\r
34 <simplesect id="_options">\r
35 <title>OPTIONS</title>\r
36 <variablelist>\r
37 <varlistentry>\r
38 <term>\r
39 -a\r
40 </term>\r
41 <term>\r
42 --all\r
43 </term>\r
44 <listitem>\r
45 <simpara>\r
46         Prints all the available commands on the standard output. This\r
47         option supersedes any other option.\r
48 </simpara>\r
49 </listitem>\r
50 </varlistentry>\r
51 <varlistentry>\r
52 <term>\r
53 -i\r
54 </term>\r
55 <term>\r
56 --info\r
57 </term>\r
58 <listitem>\r
59 <simpara>\r
60         Display manual page for the command in the <emphasis>info</emphasis> format. The\r
61         <emphasis>info</emphasis> program will be used for that purpose.\r
62 </simpara>\r
63 </listitem>\r
64 </varlistentry>\r
65 <varlistentry>\r
66 <term>\r
67 -m\r
68 </term>\r
69 <term>\r
70 --man\r
71 </term>\r
72 <listitem>\r
73 <simpara>\r
74         Display manual page for the command in the <emphasis>man</emphasis> format. This\r
75         option may be used to override a value set in the\r
76         <emphasis>help.format</emphasis> configuration variable.\r
77 </simpara>\r
78 <simpara>By default the <emphasis>man</emphasis> program will be used to display the manual page,\r
79 but the <emphasis>man.viewer</emphasis> configuration variable may be used to choose\r
80 other display programs (see below).</simpara>\r
81 </listitem>\r
82 </varlistentry>\r
83 <varlistentry>\r
84 <term>\r
85 -w\r
86 </term>\r
87 <term>\r
88 --web\r
89 </term>\r
90 <listitem>\r
91 <simpara>\r
92         Display manual page for the command in the <emphasis>web</emphasis> (HTML)\r
93         format. A web browser will be used for that purpose.\r
94 </simpara>\r
95 <simpara>The web browser can be specified using the configuration variable\r
96 <emphasis>help.browser</emphasis>, or <emphasis>web.browser</emphasis> if the former is not set. If none of\r
97 these config variables is set, the <emphasis>git web&#45;&#45;browse</emphasis> helper script\r
98 (called by <emphasis>git help</emphasis>) will pick a suitable default. See\r
99 <xref linkend="git-web&#45;&#45;browse(1)" /> for more information about this.</simpara>\r
100 </listitem>\r
101 </varlistentry>\r
102 </variablelist>\r
103 </simplesect>\r
104 <simplesect id="_configuration_variables">\r
105 <title>CONFIGURATION VARIABLES</title>\r
106 <section id="_help_format">\r
107 <title>help.format</title>\r
108 <simpara>If no command line option is passed, the <emphasis>help.format</emphasis> configuration\r
109 variable will be checked. The following values are supported for this\r
110 variable; they make <emphasis>git help</emphasis> behave as their corresponding command\r
111 line option:</simpara>\r
112 <itemizedlist>\r
113 <listitem>\r
114 <simpara>\r
115 "man" corresponds to <emphasis>-m|--man</emphasis>,\r
116 </simpara>\r
117 </listitem>\r
118 <listitem>\r
119 <simpara>\r
120 "info" corresponds to <emphasis>-i|--info</emphasis>,\r
121 </simpara>\r
122 </listitem>\r
123 <listitem>\r
124 <simpara>\r
125 "web" or "html" correspond to <emphasis>-w|--web</emphasis>.\r
126 </simpara>\r
127 </listitem>\r
128 </itemizedlist>\r
129 </section>\r
130 <section id="_help_browser_web_browser_and_browser_lt_tool_gt_path">\r
131 <title>help.browser, web.browser and browser.&lt;tool&gt;.path</title>\r
132 <simpara>The <emphasis>help.browser</emphasis>, <emphasis>web.browser</emphasis> and <emphasis>browser.&lt;tool&gt;.path</emphasis> will also\r
133 be checked if the <emphasis>web</emphasis> format is chosen (either by command line\r
134 option or configuration variable). See <emphasis>-w|--web</emphasis> in the OPTIONS\r
135 section above and <xref linkend="git-web&#45;&#45;browse(1)" />.</simpara>\r
136 </section>\r
137 <section id="_man_viewer">\r
138 <title>man.viewer</title>\r
139 <simpara>The <emphasis>man.viewer</emphasis> config variable will be checked if the <emphasis>man</emphasis> format\r
140 is chosen. The following values are currently supported:</simpara>\r
141 <itemizedlist>\r
142 <listitem>\r
143 <simpara>\r
144 "man": use the <emphasis>man</emphasis> program as usual,\r
145 </simpara>\r
146 </listitem>\r
147 <listitem>\r
148 <simpara>\r
149 "woman": use <emphasis>emacsclient</emphasis> to launch the "woman" mode in emacs\r
150 (this only works starting with emacsclient versions 22),\r
151 </simpara>\r
152 </listitem>\r
153 <listitem>\r
154 <simpara>\r
155 "konqueror": use <emphasis>kfmclient</emphasis> to open the man page in a new konqueror\r
156 tab (see <emphasis>Note about konqueror</emphasis> below).\r
157 </simpara>\r
158 </listitem>\r
159 </itemizedlist>\r
160 <simpara>Values for other tools can be used if there is a corresponding\r
161 <emphasis>man.&lt;tool&gt;.cmd</emphasis> configuration entry (see below).</simpara>\r
162 <simpara>Multiple values may be given to the <emphasis>man.viewer</emphasis> configuration\r
163 variable. Their corresponding programs will be tried in the order\r
164 listed in the configuration file.</simpara>\r
165 <simpara>For example, this configuration:</simpara>\r
166 <screen>        [man]\r
167                 viewer = konqueror\r
168                 viewer = woman</screen>\r
169 <simpara>will try to use konqueror first. But this may fail (for example if\r
170 DISPLAY is not set) and in that case emacs' woman mode will be tried.</simpara>\r
171 <simpara>If everything fails, or if no viewer is configured, the viewer specified\r
172 in the GIT_MAN_VIEWER environment variable will be tried.  If that\r
173 fails too, the <emphasis>man</emphasis> program will be tried anyway.</simpara>\r
174 </section>\r
175 <section id="_man_lt_tool_gt_path">\r
176 <title>man.&lt;tool&gt;.path</title>\r
177 <simpara>You can explicitly provide a full path to your preferred man viewer by\r
178 setting the configuration variable <emphasis>man.&lt;tool&gt;.path</emphasis>. For example, you\r
179 can configure the absolute path to konqueror by setting\r
180 <emphasis>man.konqueror.path</emphasis>. Otherwise, <emphasis>git help</emphasis> assumes the tool is\r
181 available in PATH.</simpara>\r
182 </section>\r
183 <section id="_man_lt_tool_gt_cmd">\r
184 <title>man.&lt;tool&gt;.cmd</title>\r
185 <simpara>When the man viewer, specified by the <emphasis>man.viewer</emphasis> configuration\r
186 variables, is not among the supported ones, then the corresponding\r
187 <emphasis>man.&lt;tool&gt;.cmd</emphasis> configuration variable will be looked up. If this\r
188 variable exists then the specified tool will be treated as a custom\r
189 command and a shell eval will be used to run the command with the man\r
190 page passed as arguments.</simpara>\r
191 </section>\r
192 <section id="_note_about_konqueror">\r
193 <title>Note about konqueror</title>\r
194 <simpara>When <emphasis>konqueror</emphasis> is specified in the <emphasis>man.viewer</emphasis> configuration\r
195 variable, we launch <emphasis>kfmclient</emphasis> to try to open the man page on an\r
196 already opened konqueror in a new tab if possible.</simpara>\r
197 <simpara>For consistency, we also try such a trick if <emphasis>man.konqueror.path</emphasis> is\r
198 set to something like <emphasis>A_PATH_TO/konqueror</emphasis>. That means we will try to\r
199 launch <emphasis>A_PATH_TO/kfmclient</emphasis> instead.</simpara>\r
200 <simpara>If you really want to use <emphasis>konqueror</emphasis>, then you can use something like\r
201 the following:</simpara>\r
202 <screen>        [man]\r
203                 viewer = konq\r
205         [man "konq"]\r
206                 cmd = A_PATH_TO/konqueror</screen>\r
207 </section>\r
208 <section id="_note_about_git_config_global">\r
209 <title>Note about git config --global</title>\r
210 <simpara>Note that all these configuration variables should probably be set\r
211 using the <emphasis>--global</emphasis> flag, for example like this:</simpara>\r
212 <screen>$ git config --global help.format web\r
213 $ git config --global web.browser firefox</screen>\r
214 <simpara>as they are probably more user specific than repository specific.\r
215 See <xref linkend="git-config(1)" /> for more information about this.</simpara>\r
216 </section>\r
217 </simplesect>\r
218 <simplesect id="_git">\r
219 <title>GIT</title>\r
220 <simpara>Part of the <xref linkend="git(1)" /> suite</simpara>\r
221 </simplesect>\r
222 </article>\r