OSDN Git Service

merge original branch.
[tortoisegit/TortoiseGitJp.git] / doc / source / en / TortoiseGit / git_doc / git-help.html.xml
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
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 <simpara><emphasis>git help</emphasis> [-a|--all|-i|--info|-m|--man|-w|--web] [COMMAND]</simpara>\r
18 </simplesect>\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 &#8230;</literal> is identical to <literal>git help &#8230;</literal> because the\r
30 former is internally converted into the latter.</simpara>\r
31 </simplesect>\r
32 <simplesect id="_options">\r
33 <title>OPTIONS</title>\r
34 <variablelist>\r
35 <varlistentry>\r
36 <term>\r
37 -a\r
38 </term>\r
39 <term>\r
40 --all\r
41 </term>\r
42 <listitem>\r
43 <simpara>\r
44         Prints all the available commands on the standard output. This\r
45         option supersedes any other option.\r
46 </simpara>\r
47 </listitem>\r
48 </varlistentry>\r
49 <varlistentry>\r
50 <term>\r
51 -i\r
52 </term>\r
53 <term>\r
54 --info\r
55 </term>\r
56 <listitem>\r
57 <simpara>\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
60 </simpara>\r
61 </listitem>\r
62 </varlistentry>\r
63 <varlistentry>\r
64 <term>\r
65 -m\r
66 </term>\r
67 <term>\r
68 --man\r
69 </term>\r
70 <listitem>\r
71 <simpara>\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
75 </simpara>\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
79 </listitem>\r
80 </varlistentry>\r
81 <varlistentry>\r
82 <term>\r
83 -w\r
84 </term>\r
85 <term>\r
86 --web\r
87 </term>\r
88 <listitem>\r
89 <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
92 </simpara>\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&#8212;browse</emphasis> helper script\r
96 (called by <emphasis>git-help</emphasis>) will pick a suitable default. See\r
97 <xref linkend="git-web&#8212;browse(1)"/> for more information about this.</simpara>\r
98 </listitem>\r
99 </varlistentry>\r
100 </variablelist>\r
101 </simplesect>\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
110 <itemizedlist>\r
111 <listitem>\r
112 <simpara>\r
113 "man" corresponds to <emphasis>-m|--man</emphasis>,\r
114 </simpara>\r
115 </listitem>\r
116 <listitem>\r
117 <simpara>\r
118 "info" corresponds to <emphasis>-i|--info</emphasis>,\r
119 </simpara>\r
120 </listitem>\r
121 <listitem>\r
122 <simpara>\r
123 "web" or "html" correspond to <emphasis>-w|--web</emphasis>.\r
124 </simpara>\r
125 </listitem>\r
126 </itemizedlist>\r
127 </simplesect>\r
128 <simplesect id="_help_browser_web_browser_and_browser_lt_tool_gt_path">\r
129 <title>help.browser, web.browser and browser.&lt;tool&gt;.path</title>\r
130 <simpara>The <emphasis>help.browser</emphasis>, <emphasis>web.browser</emphasis> and <emphasis>browser.&lt;tool&gt;.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&#8212;browse(1)"/>.</simpara>\r
134 </simplesect>\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
139 <itemizedlist>\r
140 <listitem>\r
141 <simpara>\r
142 "man": use the <emphasis>man</emphasis> program as usual,\r
143 </simpara>\r
144 </listitem>\r
145 <listitem>\r
146 <simpara>\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
149 </simpara>\r
150 </listitem>\r
151 <listitem>\r
152 <simpara>\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
155 </simpara>\r
156 </listitem>\r
157 </itemizedlist>\r
158 <simpara>Values for other tools can be used if there is a corresponding\r
159 <emphasis>man.&lt;tool&gt;.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
165                 viewer = konqueror\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
172 </simplesect>\r
173 <simplesect id="_man_lt_tool_gt_path">\r
174 <title>man.&lt;tool&gt;.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.&lt;tool&gt;.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
180 </simplesect>\r
181 <simplesect id="_man_lt_tool_gt_cmd">\r
182 <title>man.&lt;tool&gt;.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.&lt;tool&gt;.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
189 </simplesect>\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
201                 viewer = konq\r
202 \r
203         [man "konq"]\r
204                 cmd = A_PATH_TO/konqueror</literallayout>\r
205 </simplesect>\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
214 </simplesect>\r
215 </simplesect>\r
216 <simplesect id="_author">\r
217 <title>Author</title>\r
218 <simpara>Written by Junio C Hamano &lt;<ulink url="mailto:gitster@pobox.com">gitster@pobox.com</ulink>&gt; and the git-list\r
219 &lt;<ulink url="mailto:git@vger.kernel.org">git@vger.kernel.org</ulink>&gt;.</simpara>\r
220 </simplesect>\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 &lt;<ulink url="mailto:chriscool@tuxfamily.org">chriscool@tuxfamily.org</ulink>&gt; extracted and rewrote it a\r
225 little. Maintenance is done by the git-list &lt;<ulink url="mailto:git@vger.kernel.org">git@vger.kernel.org</ulink>&gt;.</simpara>\r
226 </simplesect>\r
227 <simplesect id="_git">\r
228 <title>GIT</title>\r
229 <simpara>Part of the <xref linkend="git(1)"/> suite</simpara>\r
230 </simplesect>\r
231 </article>\r