1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
\r
2 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
\r
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
\r
5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
\r
6 <meta name="generator" content="AsciiDoc 7.0.2" />
\r
7 <style type="text/css">
\r
9 p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
\r
11 border: 1px solid red;
\r
16 margin: 1em 5% 1em 5%;
\r
20 a:visited { color: fuchsia; }
\r
34 h1, h2, h3, h4, h5, h6 {
\r
36 font-family: sans-serif;
\r
38 margin-bottom: 0.5em;
\r
43 border-bottom: 2px solid silver;
\r
46 border-bottom: 2px solid silver;
\r
56 border: 1px solid silver;
\r
61 margin-bottom: 0.5em;
\r
71 font-family: sans-serif;
\r
78 font-family: sans-serif;
\r
82 font-family: sans-serif;
\r
84 border-top: 2px solid silver;
\r
90 padding-bottom: 0.5em;
\r
94 padding-bottom: 0.5em;
\r
98 div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
\r
99 div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
\r
100 div.admonitionblock {
\r
103 margin-bottom: 1.5em;
\r
105 div.admonitionblock {
\r
107 margin-bottom: 2.5em;
\r
110 div.content { /* Block element content. */
\r
114 /* Block element titles. */
\r
115 div.title, caption.title {
\r
116 font-family: sans-serif;
\r
120 margin-bottom: 0.5em;
\r
126 td div.title:first-child {
\r
129 div.content div.title:first-child {
\r
132 div.content + div.title {
\r
136 div.sidebarblock > div.content {
\r
137 background: #ffffee;
\r
138 border: 1px solid silver;
\r
142 div.listingblock > div.content {
\r
143 border: 1px solid silver;
\r
144 background: #f4f4f4;
\r
148 div.quoteblock > div.content {
\r
149 padding-left: 2.0em;
\r
151 div.quoteblock .attribution {
\r
155 div.admonitionblock .icon {
\r
156 vertical-align: top;
\r
159 text-decoration: underline;
\r
161 padding-right: 0.5em;
\r
163 div.admonitionblock td.content {
\r
164 padding-left: 0.5em;
\r
165 border-left: 2px solid silver;
\r
168 div.exampleblock > div.content {
\r
169 border-left: 2px solid silver;
\r
173 div.verseblock div.content {
\r
177 div.imageblock div.content { padding-left: 0; }
\r
178 div.imageblock img { border: 1px solid silver; }
\r
179 span.image img { border-style: none; }
\r
183 margin-bottom: 0.8em;
\r
188 font-style: italic;
\r
190 dd > *:first-child {
\r
195 list-style-position: outside;
\r
198 list-style-type: lower-alpha;
\r
201 div.tableblock > table {
\r
202 border-color: #527bbd;
\r
206 font-family: sans-serif;
\r
215 margin-bottom: 0.8em;
\r
218 vertical-align: top;
\r
219 font-style: italic;
\r
220 padding-right: 0.8em;
\r
223 vertical-align: top;
\r
227 div#footer-badges { display: none; }
\r
229 include::./stylesheets/xhtml11-manpage.css[]
\r
230 /* Workarounds for IE6's broken and incomplete CSS2. */
\r
232 div.sidebar-content {
\r
233 background: #ffffee;
\r
234 border: 1px solid silver;
\r
237 div.sidebar-title, div.image-title {
\r
238 font-family: sans-serif;
\r
241 margin-bottom: 0.5em;
\r
244 div.listingblock div.content {
\r
245 border: 1px solid silver;
\r
246 background: #f4f4f4;
\r
250 div.quoteblock-content {
\r
251 padding-left: 2.0em;
\r
254 div.exampleblock-content {
\r
255 border-left: 2px solid silver;
\r
256 padding-left: 0.5em;
\r
259 <title>git-ls-files(1)</title>
\r
264 git-ls-files(1) Manual Page
\r
267 <div class="sectionbody">
\r
269 Information about files in the index/working directory
\r
274 <div class="sectionbody">
\r
275 <div class="verseblock">
\r
276 <div class="content"><em>git-ls-files</em> [-z] [-t] [-v]
\r
277 (--[cached|deleted|others|ignored|stage|unmerged|killed|modified])*
\r
278 (-[c|d|o|i|s|u|k|m])*
\r
279 [-x <pattern>|--exclude=<pattern>]
\r
280 [-X <file>|--exclude-from=<file>]
\r
281 [--exclude-per-directory=<file>]
\r
283 [--full-name] [--abbrev] [--] [<file>]*</div></div>
\r
285 <h2>DESCRIPTION</h2>
\r
286 <div class="sectionbody">
\r
287 <p>This merges the file listing in the directory cache index with the
\r
288 actual working directory list, and shows different combinations of the
\r
290 <p>One or more of the options below may be used to determine the files
\r
294 <div class="sectionbody">
\r
301 Show cached files in the output (default)
\r
309 Show deleted files in the output
\r
317 Show modified files in the output
\r
325 Show other files in the output
\r
333 Show ignored files in the output
\r
334 Note the this also reverses any exclude list present.
\r
342 Show stage files in the output
\r
350 If a whole directory is classified as "other", show just its
\r
351 name (with a trailing slash) and not its whole contents.
\r
355 --no-empty-directory
\r
359 Do not list empty directories. Has no effect without --directory.
\r
367 Show unmerged files in the output (forces --stage)
\r
375 Show files on the filesystem that need to be removed due
\r
376 to file/directory conflicts for checkout-index to
\r
385 \0 line termination on output.
\r
389 -x|--exclude=<pattern>
\r
393 Skips files matching pattern.
\r
394 Note that pattern is a shell wildcard pattern.
\r
398 -X|--exclude-from=<file>
\r
402 exclude patterns are read from <file>; 1 per line.
\r
406 --exclude-per-directory=<file>
\r
410 read additional exclude patterns that apply only to the
\r
411 directory and its subdirectories in <file>.
\r
419 If any <file> does not appear in the index, treat this as an
\r
428 Identify the file status with the following tags (followed by
\r
429 a space) at the start of each line:
\r
431 <div class="hlist"><table>
\r
433 <td class="hlist1">
\r
436 <td class="hlist2">
\r
441 <td class="hlist1">
\r
444 <td class="hlist2">
\r
449 <td class="hlist1">
\r
452 <td class="hlist2">
\r
457 <td class="hlist1">
\r
460 <td class="hlist2">
\r
465 <td class="hlist1">
\r
468 <td class="hlist2">
\r
473 <td class="hlist1">
\r
476 <td class="hlist2">
\r
487 Similar to <tt>-t</tt>, but use lowercase letters for files
\r
488 that are marked as <em>always matching index</em>.
\r
496 When run from a subdirectory, the command usually
\r
497 outputs paths relative to the current directory. This
\r
498 option forces paths to be output relative to the project
\r
503 --abbrev[=<n>]
\r
507 Instead of showing the full 40-byte hexadecimal object
\r
508 lines, show only handful hexdigits prefix.
\r
509 Non default number of digits can be specified with --abbrev=<n>.
\r
517 Do not interpret any more arguments as options.
\r
525 Files to show. If no files are given all files which match the other
\r
526 specified criteria are shown.
\r
532 <div class="sectionbody">
\r
533 <p>show files just outputs the filename unless <em>--stage</em> is specified in
\r
534 which case it outputs:</p>
\r
535 <div class="literalblock">
\r
536 <div class="content">
\r
537 <pre><tt>[<tag> ]<mode> <object> <stage> <file></tt></pre>
\r
539 <p>"git-ls-files --unmerged" and "git-ls-files --stage" can be used to examine
\r
540 detailed information on unmerged paths.</p>
\r
541 <p>For an unmerged path, instead of recording a single mode/SHA1 pair,
\r
542 the dircache records up to three such pairs; one from tree O in stage
\r
543 1, A in stage 2, and B in stage 3. This information can be used by
\r
544 the user (or the porcelain) to see what should eventually be recorded at the
\r
545 path. (see git-read-tree for more information on state)</p>
\r
546 <p>When <tt>-z</tt> option is not used, TAB, LF, and backslash characters
\r
547 in pathnames are represented as <tt>\t</tt>, <tt>\n</tt>, and <tt>\\</tt>,
\r
550 <h2>Exclude Patterns</h2>
\r
551 <div class="sectionbody">
\r
552 <p><em>git-ls-files</em> can use a list of "exclude patterns" when
\r
553 traversing the directory tree and finding files to show when the
\r
554 flags --others or --ignored are specified.</p>
\r
555 <p>These exclude patterns come from these places:</p>
\r
559 command line flag --exclude=<pattern> specifies a single
\r
565 command line flag --exclude-from=<file> specifies a list of
\r
566 patterns stored in a file.
\r
571 command line flag --exclude-per-directory=<name> specifies
\r
572 a name of the file in each directory <em>git-ls-files</em>
\r
573 examines, and if exists, its contents are used as an
\r
574 additional list of patterns.
\r
578 <p>An exclude pattern file used by (2) and (3) contains one pattern
\r
579 per line. A line that starts with a <em>#</em> can be used as comment
\r
580 for readability.</p>
\r
581 <p>There are three lists of patterns that are in effect at a given
\r
582 time. They are built and ordered in the following way:</p>
\r
586 --exclude=<pattern> from the command line; patterns are
\r
587 ordered in the same order as they appear on the command line.
\r
592 lines read from --exclude-from=<file>; patterns are ordered
\r
593 in the same order as they appear in the file.
\r
598 When --exclude-per-directory=<name> is specified, upon
\r
599 entering a directory that has such a file, its contents are
\r
600 appended at the end of the current "list of patterns". They
\r
601 are popped off when leaving the directory.
\r
605 <p>Each pattern in the pattern list specifies "a match pattern" and
\r
606 optionally the fate; either a file that matches the pattern is
\r
607 considered excluded or included. A filename is matched against
\r
608 the patterns in the three lists; the --exclude-from list is
\r
609 checked first, then the --exclude-per-directory list, and then
\r
610 finally the --exclude list. The last match determines its fate.
\r
611 If there is no match in the three lists, the fate is "included".</p>
\r
612 <p>A pattern specified on the command line with --exclude or read
\r
613 from the file specified with --exclude-from is relative to the
\r
614 top of the directory tree. A pattern read from a file specified
\r
615 by --exclude-per-directory is relative to the directory that the
\r
616 pattern file appears in.</p>
\r
617 <p>An exclude pattern is of the following format:</p>
\r
621 an optional prefix <em>!</em> which means that the fate this pattern
\r
622 specifies is "include", not the usual "exclude"; the
\r
623 remainder of the pattern string is interpreted according to
\r
624 the following rules.
\r
629 if it does not contain a slash <em>/</em>, it is a shell glob
\r
630 pattern and used to match against the filename without
\r
631 leading directories (i.e. the same way as the current
\r
637 otherwise, it is a shell glob pattern, suitable for
\r
638 consumption by fnmatch(3) with FNM_PATHNAME flag. I.e. a
\r
639 slash in the pattern must match a slash in the pathname.
\r
640 "Documentation/*.html" matches "Documentation/git.html" but
\r
641 not "ppc/ppc.html". As a natural exception, "/*.c" matches
\r
642 "cat-file.c" but not "mozilla-sha1/sha1.c".
\r
647 <div class="listingblock">
\r
648 <div class="content">
\r
649 <pre><tt> $ cat .git/ignore
\r
650 # ignore objects and archives, anywhere in the tree.
\r
652 $ cat Documentation/.gitignore
\r
653 # ignore generated html files,
\r
655 # except foo.html which is maintained by hand
\r
657 $ git-ls-files --ignored \
\r
658 --exclude='Documentation/*.[0-9]' \
\r
659 --exclude-from=.git/ignore \
\r
660 --exclude-per-directory=.gitignore</tt></pre>
\r
664 <div class="sectionbody">
\r
665 <p><a href="git-read-tree.html">git-read-tree(1)</a></p>
\r
668 <div class="sectionbody">
\r
669 <p>Written by Linus Torvalds <torvalds@osdl.org></p>
\r
671 <h2>Documentation</h2>
\r
672 <div class="sectionbody">
\r
673 <p>Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>.</p>
\r
676 <div class="sectionbody">
\r
677 <p>Part of the <a href="git.html">git(7)</a> suite</p>
\r
680 <div id="footer-text">
\r
681 Last updated 28-Mar-2006 00:27:56 UTC
\r