Updated git_doc to git 1.8
[TortoiseGit.git] / doc / source / en / TortoiseGit / git_doc / git-status.xml
blobd62ffac78ce0d471b672e67a49e3d94106938fc7
1 <?xml version="1.0" encoding="UTF-8"?>\r
2 <!DOCTYPE sect2 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">\r
3 \r
4 <sect2 lang="en" id="git-status(1)">\r
5     <title>git-status(1)</title>\r
6 <indexterm>\r
7 <primary>git-status(1)</primary>\r
8 </indexterm>\r
9 <simplesect id="git-status(1)__name">\r
10 <title>NAME</title>\r
11 <simpara>git-status - Show the working tree status</simpara>\r
12 </simplesect>\r
13 <simplesect id="git-status(1)__synopsis">\r
14 <title>SYNOPSIS</title>\r
15 <blockquote>\r
16 <literallayout><emphasis>git status</emphasis> [&lt;options&gt;&#8230;] [--] [&lt;pathspec&gt;&#8230;]</literallayout>\r
17 </blockquote>\r
18 </simplesect>\r
19 <simplesect id="git-status(1)__description">\r
20 <title>DESCRIPTION</title>\r
21 <simpara>Displays paths that have differences between the index file and the\r
22 current HEAD commit, paths that have differences between the working\r
23 tree and the index file, and paths in the working tree that are not\r
24 tracked by git (and are not ignored by <xref linkend="gitignore(5)" />). The first\r
25 are what you <emphasis>would</emphasis> commit by running <emphasis>git commit</emphasis>; the second and\r
26 third are what you <emphasis>could</emphasis> commit by running <emphasis>git add</emphasis> before running\r
27 <emphasis>git commit</emphasis>.</simpara>\r
28 </simplesect>\r
29 <simplesect id="git-status(1)__options">\r
30 <title>OPTIONS</title>\r
31 <variablelist>\r
32 <varlistentry>\r
33 <term>\r
34 -s\r
35 </term>\r
36 <term>\r
37 --short\r
38 </term>\r
39 <listitem>\r
40 <simpara>\r
41         Give the output in the short-format.\r
42 </simpara>\r
43 </listitem>\r
44 </varlistentry>\r
45 <varlistentry>\r
46 <term>\r
47 -b\r
48 </term>\r
49 <term>\r
50 --branch\r
51 </term>\r
52 <listitem>\r
53 <simpara>\r
54         Show the branch and tracking info even in short-format.\r
55 </simpara>\r
56 </listitem>\r
57 </varlistentry>\r
58 <varlistentry>\r
59 <term>\r
60 --porcelain\r
61 </term>\r
62 <listitem>\r
63 <simpara>\r
64         Give the output in an easy-to-parse format for scripts.\r
65         This is similar to the short output, but will remain stable\r
66         across git versions and regardless of user configuration. See\r
67         below for details.\r
68 </simpara>\r
69 </listitem>\r
70 </varlistentry>\r
71 <varlistentry>\r
72 <term>\r
73 --long\r
74 </term>\r
75 <listitem>\r
76 <simpara>\r
77         Give the output in the long-format. This is the default.\r
78 </simpara>\r
79 </listitem>\r
80 </varlistentry>\r
81 <varlistentry>\r
82 <term>\r
83 -u[&lt;mode&gt;]\r
84 </term>\r
85 <term>\r
86 --untracked-files[=&lt;mode&gt;]\r
87 </term>\r
88 <listitem>\r
89 <simpara>\r
90         Show untracked files.\r
91 </simpara>\r
92 <simpara>The mode parameter is optional (defaults to <emphasis>all</emphasis>), and is used to\r
93 specify the handling of untracked files; when -u is not used, the\r
94 default is <emphasis>normal</emphasis>, i.e. show untracked files and directories.</simpara>\r
95 <simpara>The possible options are:</simpara>\r
96 <itemizedlist>\r
97 <listitem>\r
98 <simpara>\r
99 <emphasis>no</emphasis>     - Show no untracked files\r
100 </simpara>\r
101 </listitem>\r
102 <listitem>\r
103 <simpara>\r
104 <emphasis>normal</emphasis> - Shows untracked files and directories\r
105 </simpara>\r
106 </listitem>\r
107 <listitem>\r
108 <simpara>\r
109 <emphasis>all</emphasis>    - Also shows individual files in untracked directories.\r
110 </simpara>\r
111 <simpara>The default can be changed using the status.showUntrackedFiles\r
112 configuration variable documented in <xref linkend="git-config(1)" />.</simpara>\r
113 </listitem>\r
114 </itemizedlist>\r
115 </listitem>\r
116 </varlistentry>\r
117 <varlistentry>\r
118 <term>\r
119 --ignore-submodules[=&lt;when&gt;]\r
120 </term>\r
121 <listitem>\r
122 <simpara>\r
123         Ignore changes to submodules when looking for changes. &lt;when&gt; can be\r
124         either "none", "untracked", "dirty" or "all", which is the default.\r
125         Using "none" will consider the submodule modified when it either contains\r
126         untracked or modified files or its HEAD differs from the commit recorded\r
127         in the superproject and can be used to override any settings of the\r
128         <emphasis>ignore</emphasis> option in <xref linkend="git-config(1)" /> or <xref linkend="gitmodules(5)" />. When\r
129         "untracked" is used submodules are not considered dirty when they only\r
130         contain untracked content (but they are still scanned for modified\r
131         content). Using "dirty" ignores all changes to the work tree of submodules,\r
132         only changes to the commits stored in the superproject are shown (this was\r
133         the behavior before 1.7.0). Using "all" hides all changes to submodules\r
134         (and suppresses the output of submodule summaries when the config option\r
135         <emphasis>status.submodulesummary</emphasis> is set).\r
136 </simpara>\r
137 </listitem>\r
138 </varlistentry>\r
139 <varlistentry>\r
140 <term>\r
141 --ignored\r
142 </term>\r
143 <listitem>\r
144 <simpara>\r
145         Show ignored files as well.\r
146 </simpara>\r
147 </listitem>\r
148 </varlistentry>\r
149 <varlistentry>\r
150 <term>\r
151 -z\r
152 </term>\r
153 <listitem>\r
154 <simpara>\r
155         Terminate entries with NUL, instead of LF.  This implies\r
156         the <emphasis>--porcelain</emphasis> output format if no other format is given.\r
157 </simpara>\r
158 </listitem>\r
159 </varlistentry>\r
160 <varlistentry>\r
161 <term>\r
162 --column[=&lt;options&gt;]\r
163 </term>\r
164 <term>\r
165 --no-column\r
166 </term>\r
167 <listitem>\r
168 <simpara>\r
169         Display untracked files in columns. See configuration variable\r
170         column.status for option syntax.<emphasis>--column</emphasis> and <emphasis>--no-column</emphasis>\r
171         without options are equivalent to <emphasis>always</emphasis> and <emphasis>never</emphasis>\r
172         respectively.\r
173 </simpara>\r
174 </listitem>\r
175 </varlistentry>\r
176 </variablelist>\r
177 </simplesect>\r
178 <simplesect id="git-status(1)__output">\r
179 <title>OUTPUT</title>\r
180 <simpara>The output from this command is designed to be used as a commit\r
181 template comment, and all the output lines are prefixed with <emphasis>#</emphasis>.\r
182 The default, long format, is designed to be human readable,\r
183 verbose and descriptive.  Its contents and format are subject to change\r
184 at any time.</simpara>\r
185 <simpara>The paths mentioned in the output, unlike many other git commands, are\r
186 made relative to the current directory if you are working in a\r
187 subdirectory (this is on purpose, to help cutting and pasting). See\r
188 the status.relativePaths config option below.</simpara>\r
189 <section id="git-status(1)__short_format">\r
190 <title>Short Format</title>\r
191 <simpara>In the short-format, the status of each path is shown as</simpara>\r
192 <literallayout class="monospaced">XY PATH1 -&gt; PATH2</literallayout>\r
193 <simpara>where <emphasis>PATH1</emphasis> is the path in the <emphasis>HEAD</emphasis>, and the " <emphasis>-&gt; PATH2</emphasis>" part is\r
194 shown only when <emphasis>PATH1</emphasis> corresponds to a different path in the\r
195 index/worktree (i.e. the file is renamed). The <emphasis>XY</emphasis> is a two-letter\r
196 status code.</simpara>\r
197 <simpara>The fields (including the <emphasis>-&gt;</emphasis>) are separated from each other by a\r
198 single space. If a filename contains whitespace or other nonprintable\r
199 characters, that field will be quoted in the manner of a C string\r
200 literal: surrounded by ASCII double quote (34) characters, and with\r
201 interior special characters backslash-escaped.</simpara>\r
202 <simpara>For paths with merge conflicts, <emphasis>X</emphasis> and <emphasis>Y</emphasis> show the modification\r
203 states of each side of the merge. For paths that do not have merge\r
204 conflicts, <emphasis>X</emphasis> shows the status of the index, and <emphasis>Y</emphasis> shows the status\r
205 of the work tree.  For untracked paths, <emphasis>XY</emphasis> are <emphasis>??</emphasis>.  Other status\r
206 codes can be interpreted as follows:</simpara>\r
207 <itemizedlist>\r
208 <listitem>\r
209 <simpara>\r
210 ' ' = unmodified\r
211 </simpara>\r
212 </listitem>\r
213 <listitem>\r
214 <simpara>\r
215 <emphasis>M</emphasis> = modified\r
216 </simpara>\r
217 </listitem>\r
218 <listitem>\r
219 <simpara>\r
220 <emphasis>A</emphasis> = added\r
221 </simpara>\r
222 </listitem>\r
223 <listitem>\r
224 <simpara>\r
225 <emphasis>D</emphasis> = deleted\r
226 </simpara>\r
227 </listitem>\r
228 <listitem>\r
229 <simpara>\r
230 <emphasis>R</emphasis> = renamed\r
231 </simpara>\r
232 </listitem>\r
233 <listitem>\r
234 <simpara>\r
235 <emphasis>C</emphasis> = copied\r
236 </simpara>\r
237 </listitem>\r
238 <listitem>\r
239 <simpara>\r
240 <emphasis>U</emphasis> = updated but unmerged\r
241 </simpara>\r
242 </listitem>\r
243 </itemizedlist>\r
244 <simpara>Ignored files are not listed, unless <emphasis>--ignored</emphasis> option is in effect,\r
245 in which case <emphasis>XY</emphasis> are <emphasis>!!</emphasis>.</simpara>\r
246 <literallayout class="monospaced">X          Y     Meaning\r
247 -------------------------------------------------\r
248           [MD]   not updated\r
249 M        [ MD]   updated in index\r
250 A        [ MD]   added to index\r
251 D         [ M]   deleted from index\r
252 R        [ MD]   renamed in index\r
253 C        [ MD]   copied in index\r
254 [MARC]           index and work tree matches\r
255 [ MARC]     M    work tree changed since index\r
256 [ MARC]     D    deleted in work tree\r
257 -------------------------------------------------\r
258 D           D    unmerged, both deleted\r
259 A           U    unmerged, added by us\r
260 U           D    unmerged, deleted by them\r
261 U           A    unmerged, added by them\r
262 D           U    unmerged, deleted by us\r
263 A           A    unmerged, both added\r
264 U           U    unmerged, both modified\r
265 -------------------------------------------------\r
266 ?           ?    untracked\r
267 !           !    ignored\r
268 -------------------------------------------------</literallayout>\r
269 <simpara>If -b is used the short-format status is preceded by a line</simpara>\r
270 <simpara>## branchname tracking info</simpara>\r
271 </section>\r
272 <section id="git-status(1)__porcelain_format">\r
273 <title>Porcelain Format</title>\r
274 <simpara>The porcelain format is similar to the short format, but is guaranteed\r
275 not to change in a backwards-incompatible way between git versions or\r
276 based on user configuration. This makes it ideal for parsing by scripts.\r
277 The description of the short format above also describes the porcelain\r
278 format, with a few exceptions:</simpara>\r
279 <orderedlist numeration="arabic">\r
280 <listitem>\r
281 <simpara>\r
282 The user's color.status configuration is not respected; color will\r
283    always be off.\r
284 </simpara>\r
285 </listitem>\r
286 <listitem>\r
287 <simpara>\r
288 The user's status.relativePaths configuration is not respected; paths\r
289    shown will always be relative to the repository root.\r
290 </simpara>\r
291 </listitem>\r
292 </orderedlist>\r
293 <simpara>There is also an alternate -z format recommended for machine parsing. In\r
294 that format, the status field is the same, but some other things\r
295 change.  First, the <emphasis>-&gt;</emphasis> is omitted from rename entries and the field\r
296 order is reversed (e.g <emphasis>from -&gt; to</emphasis> becomes <emphasis>to from</emphasis>). Second, a NUL\r
297 (ASCII 0) follows each filename, replacing space as a field separator\r
298 and the terminating newline (but a space still separates the status\r
299 field from the first filename).  Third, filenames containing special\r
300 characters are not specially formatted; no quoting or\r
301 backslash-escaping is performed.</simpara>\r
302 </section>\r
303 </simplesect>\r
304 <simplesect id="git-status(1)__configuration">\r
305 <title>CONFIGURATION</title>\r
306 <simpara>The command honors <emphasis>color.status</emphasis> (or <emphasis>status.color</emphasis> -- they\r
307 mean the same thing and the latter is kept for backward\r
308 compatibility) and <emphasis>color.status.&lt;slot&gt;</emphasis> configuration variables\r
309 to colorize its output.</simpara>\r
310 <simpara>If the config variable <emphasis>status.relativePaths</emphasis> is set to false, then all\r
311 paths shown are relative to the repository root, not to the current\r
312 directory.</simpara>\r
313 <simpara>If <emphasis>status.submodulesummary</emphasis> is set to a non zero number or true (identical\r
314 to -1 or an unlimited number), the submodule summary will be enabled for\r
315 the long format and a summary of commits for modified submodules will be\r
316 shown (see --summary-limit option of <xref linkend="git-submodule(1)" />).</simpara>\r
317 </simplesect>\r
318 <simplesect id="git-status(1)__see_also">\r
319 <title>SEE ALSO</title>\r
320 <simpara><xref linkend="gitignore(5)" /></simpara>\r
321 </simplesect>\r
322 <simplesect id="git-status(1)__git">\r
323 <title>GIT</title>\r
324 <simpara>Part of the <xref linkend="git(1)" /> suite</simpara>\r
325 </simplesect>\r
326 </sect2>\r