summaryrefslogtreecommitdiffstats
path: root/git-ls-files.html
diff options
context:
space:
mode:
Diffstat (limited to 'git-ls-files.html')
-rw-r--r--git-ls-files.html91
1 files changed, 64 insertions, 27 deletions
diff --git a/git-ls-files.html b/git-ls-files.html
index e81b784bf..d18d792ad 100644
--- a/git-ls-files.html
+++ b/git-ls-files.html
@@ -752,6 +752,7 @@ git-ls-files(1) Manual Page
<pre class="content"><em>git ls-files</em> [-z] [-t] [-v] [-f]
[-c|--cached] [-d|--deleted] [-o|--others] [-i|--ignored]
[-s|--stage] [-u|--unmerged] [-k|--killed] [-m|--modified]
+ [--resolve-undo]
[--directory [--no-empty-directory]] [--eol]
[--deduplicate]
[-x &lt;pattern&gt;|--exclude=&lt;pattern&gt;]
@@ -771,7 +772,9 @@ git-ls-files(1) Manual Page
<div class="paragraph"><p>This merges the file listing in the index with the actual working
directory list, and shows different combinations of the two.</p></div>
<div class="paragraph"><p>One or more of the options below may be used to determine the files
-shown:</p></div>
+shown, and each file may be printed multiple times if there are
+multiple entries in the index or multiple statuses are applicable for
+the relevant file selection options.</p></div>
</div>
</div>
<div class="sect1">
@@ -786,7 +789,9 @@ shown:</p></div>
</dt>
<dd>
<p>
- Show cached files in the output (default)
+ Show all files cached in Git&#8217;s index, i.e. all tracked files.
+ (This is the default if no -c/-s/-d/-o/-u/-k/-m/--resolve-undo
+ options are specified.)
</p>
</dd>
<dt class="hdlist1">
@@ -797,7 +802,7 @@ shown:</p></div>
</dt>
<dd>
<p>
- Show deleted files in the output
+ Show files with an unstaged deletion
</p>
</dd>
<dt class="hdlist1">
@@ -808,7 +813,8 @@ shown:</p></div>
</dt>
<dd>
<p>
- Show modified files in the output
+ Show files with an unstaged modification (note that an unstaged
+ deletion also counts as an unstaged modification)
</p>
</dd>
<dt class="hdlist1">
@@ -830,11 +836,14 @@ shown:</p></div>
</dt>
<dd>
<p>
- Show only ignored files in the output. When showing files in the
- index, print only those matched by an exclude pattern. When
- showing "other" files, show only those matched by an exclude
- pattern. Standard ignore rules are not automatically activated,
- therefore at least one of the <code>--exclude*</code> options is required.
+ Show only ignored files in the output. Must be used with
+ either an explicit <em>-c</em> or <em>-o</em>. When showing files in the
+ index (i.e. when used with <em>-c</em>), print only those files
+ matching an exclude pattern. When showing "other" files
+ (i.e. when used with <em>-o</em>), show only those matched by an
+ exclude pattern. Standard ignore rules are not automatically
+ activated, therefore at least one of the <code>--exclude*</code> options
+ is required.
</p>
</dd>
<dt class="hdlist1">
@@ -855,6 +864,7 @@ shown:</p></div>
<p>
If a whole directory is classified as "other", show just its
name (with a trailing slash) and not its whole contents.
+ Has no effect without -o/--others.
</p>
</dd>
<dt class="hdlist1">
@@ -873,7 +883,9 @@ shown:</p></div>
</dt>
<dd>
<p>
- Show unmerged files in the output (forces --stage)
+ Show information about unmerged files in the output, but do
+ not show any other tracked files (forces --stage, overrides
+ --cached).
</p>
</dd>
<dt class="hdlist1">
@@ -884,9 +896,21 @@ shown:</p></div>
</dt>
<dd>
<p>
- Show files on the filesystem that need to be removed due
- to file/directory conflicts for checkout-index to
- succeed.
+ Show untracked files on the filesystem that need to be removed
+ due to file/directory conflicts for tracked files to be able to
+ be written to the filesystem.
+</p>
+</dd>
+<dt class="hdlist1">
+--resolve-undo
+</dt>
+<dd>
+<p>
+ Show files having resolve-undo information in the index
+ together with their resolve-undo information. (resolve-undo
+ information is what is used to implement "git checkout -m
+ $PATH", i.e. to recreate merge conflicts that were
+ accidentally resolved)
</p>
</dd>
<dt class="hdlist1">
@@ -940,7 +964,8 @@ shown:</p></div>
<dd>
<p>
Read additional exclude patterns that apply only to the
- directory and its subdirectories in &lt;file&gt;.
+ directory and its subdirectories in &lt;file&gt;. Deprecated; use
+ --exclude-standard instead.
</p>
</dd>
<dt class="hdlist1">
@@ -978,8 +1003,8 @@ shown:</p></div>
</dt>
<dd>
<p>
- This feature is semi-deprecated. For scripting purpose,
- <a href="git-status.html">git-status(1)</a> <code>--porcelain</code> and
+ Show status tags together with filenames. Note that for
+ scripting purposes, <a href="git-status.html">git-status(1)</a> <code>--porcelain</code> and
<a href="git-diff-files.html">git-diff-files(1)</a> <code>--name-status</code> are almost always
superior alternatives, and users should look at
<a href="git-status.html">git-status(1)</a> <code>--short</code> or <a href="git-diff.html">git-diff(1)</a>
@@ -987,15 +1012,16 @@ shown:</p></div>
</p>
<div class="openblock">
<div class="content">
-<div class="paragraph"><p>This option identifies the file status with the following tags (followed by
-a space) at the start of each line:</p></div>
+<div class="paragraph"><p>This option provides a reason for showing each filename, in the form
+of a status tag (which is followed by a space and then the filename).
+The status tags are all single characters from the following list:</p></div>
<div class="dlist"><dl>
<dt class="hdlist1">
H
</dt>
<dd>
<p>
-cached
+tracked file that is not either unmerged or skip-worktree
</p>
</dd>
<dt class="hdlist1">
@@ -1003,7 +1029,7 @@ S
</dt>
<dd>
<p>
-skip-worktree
+tracked file that is skip-worktree
</p>
</dd>
<dt class="hdlist1">
@@ -1011,7 +1037,7 @@ M
</dt>
<dd>
<p>
-unmerged
+tracked file that is unmerged
</p>
</dd>
<dt class="hdlist1">
@@ -1019,7 +1045,7 @@ R
</dt>
<dd>
<p>
-removed/deleted
+tracked file with unstaged removal/deletion
</p>
</dd>
<dt class="hdlist1">
@@ -1027,7 +1053,7 @@ C
</dt>
<dd>
<p>
-modified/changed
+tracked file with unstaged modification/change
</p>
</dd>
<dt class="hdlist1">
@@ -1035,7 +1061,8 @@ K
</dt>
<dd>
<p>
-to be killed
+untracked paths which are part of file/directory conflicts
+ which prevent checking out tracked files
</p>
</dd>
<dt class="hdlist1">
@@ -1043,7 +1070,15 @@ to be killed
</dt>
<dd>
<p>
-other
+untracked file
+</p>
+</dd>
+<dt class="hdlist1">
+U
+</dt>
+<dd>
+<p>
+file with resolve-undo information
</p>
</dd>
</dl></div>
@@ -1277,7 +1312,9 @@ path
traversing the directory tree and finding files to show when the
flags --others or --ignored are specified. <a href="gitignore.html">gitignore(5)</a>
specifies the format of exclude patterns.</p></div>
-<div class="paragraph"><p>These exclude patterns come from these places, in order:</p></div>
+<div class="paragraph"><p>Generally, you should just use --exclude-standard, but for historical
+reasons the exclude patterns can be specified from the following
+places, in order:</p></div>
<div class="olist arabic"><ol class="arabic">
<li>
<p>
@@ -1327,7 +1364,7 @@ pattern file appears in.</p></div>
<div id="footer">
<div id="footer-text">
Last updated
- 2022-11-11 23:55:30 PST
+ 2023-02-03 21:26:01 PST
</div>
</div>
</body>