summaryrefslogtreecommitdiffstats
path: root/man1/git-ls-files.1
diff options
context:
space:
mode:
Diffstat (limited to 'man1/git-ls-files.1')
-rw-r--r--man1/git-ls-files.160
1 files changed, 38 insertions, 22 deletions
diff --git a/man1/git-ls-files.1 b/man1/git-ls-files.1
index fc21b176c..521a93353 100644
--- a/man1/git-ls-files.1
+++ b/man1/git-ls-files.1
@@ -2,12 +2,12 @@
.\" Title: git-ls-files
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 01/30/2023
+.\" Date: 02/03/2023
.\" Manual: Git Manual
-.\" Source: Git 2.39.1.388.g2fc9e9ca3c
+.\" Source: Git 2.39.1.409.ga6a323b31e
.\" Language: English
.\"
-.TH "GIT\-LS\-FILES" "1" "01/30/2023" "Git 2\&.39\&.1\&.388\&.g2fc9e9" "Git Manual"
+.TH "GIT\-LS\-FILES" "1" "02/03/2023" "Git 2\&.39\&.1\&.409\&.ga6a323" "Git Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -35,6 +35,7 @@ git-ls-files \- Show information about files in the index and the working tree
\fIgit ls\-files\fR [\-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 <pattern>|\-\-exclude=<pattern>]
@@ -50,22 +51,22 @@ git-ls-files \- Show information about files in the index and the working tree
.sp
This merges the file listing in the index with the actual working directory list, and shows different combinations of the two\&.
.sp
-One or more of the options below may be used to determine the files shown:
+One or more of the options below may be used to determine the files 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\&.
.SH "OPTIONS"
.PP
\-c, \-\-cached
.RS 4
-Show cached files in the output (default)
+Show all files cached in Git\(cqs index, i\&.e\&. all tracked files\&. (This is the default if no \-c/\-s/\-d/\-o/\-u/\-k/\-m/\-\-resolve\-undo options are specified\&.)
.RE
.PP
\-d, \-\-deleted
.RS 4
-Show deleted files in the output
+Show files with an unstaged deletion
.RE
.PP
\-m, \-\-modified
.RS 4
-Show modified files in the output
+Show files with an unstaged modification (note that an unstaged deletion also counts as an unstaged modification)
.RE
.PP
\-o, \-\-others
@@ -75,7 +76,12 @@ Show other (i\&.e\&. untracked) files in the output
.PP
\-i, \-\-ignored
.RS 4
-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
+Show only ignored files in the output\&. Must be used with either an explicit
+\fI\-c\fR
+or
+\fI\-o\fR\&. When showing files in the index (i\&.e\&. when used with
+\fI\-c\fR), print only those files matching an exclude pattern\&. When showing "other" files (i\&.e\&. when used with
+\fI\-o\fR), show only those matched by an exclude pattern\&. Standard ignore rules are not automatically activated, therefore at least one of the
\fB\-\-exclude*\fR
options is required\&.
.RE
@@ -87,7 +93,7 @@ Show staged contents\(aq mode bits, object name and stage number in the output\&
.PP
\-\-directory
.RS 4
-If a whole directory is classified as "other", show just its name (with a trailing slash) and not its whole contents\&.
+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\&.
.RE
.PP
\-\-no\-empty\-directory
@@ -97,12 +103,17 @@ Do not list empty directories\&. Has no effect without \-\-directory\&.
.PP
\-u, \-\-unmerged
.RS 4
-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)\&.
.RE
.PP
\-k, \-\-killed
.RS 4
-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\&.
+.RE
+.PP
+\-\-resolve\-undo
+.RS 4
+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)
.RE
.PP
\-z
@@ -135,7 +146,7 @@ Read exclude patterns from <file>; 1 per line\&.
.PP
\-\-exclude\-per\-directory=<file>
.RS 4
-Read additional exclude patterns that apply only to the directory and its subdirectories in <file>\&.
+Read additional exclude patterns that apply only to the directory and its subdirectories in <file>\&. Deprecated; use \-\-exclude\-standard instead\&.
.RE
.PP
\-\-exclude\-standard
@@ -159,7 +170,7 @@ options does not make any sense\&.
.PP
\-t
.RS 4
-This feature is semi\-deprecated\&. For scripting purpose,
+Show status tags together with filenames\&. Note that for scripting purposes,
\fBgit-status\fR(1)
\fB\-\-porcelain\fR
and
@@ -173,41 +184,46 @@ or
\fB\-\-name\-status\fR
for more user\-friendly alternatives\&.
.sp
-This option identifies the file status with the following tags (followed by a space) at the start of each line:
+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:
.PP
H
.RS 4
-cached
+tracked file that is not either unmerged or skip\-worktree
.RE
.PP
S
.RS 4
-skip\-worktree
+tracked file that is skip\-worktree
.RE
.PP
M
.RS 4
-unmerged
+tracked file that is unmerged
.RE
.PP
R
.RS 4
-removed/deleted
+tracked file with unstaged removal/deletion
.RE
.PP
C
.RS 4
-modified/changed
+tracked file with unstaged modification/change
.RE
.PP
K
.RS 4
-to be killed
+untracked paths which are part of file/directory conflicts which prevent checking out tracked files
.RE
.PP
?
.RS 4
-other
+untracked file
+.RE
+.PP
+U
+.RS 4
+file with resolve\-undo information
.RE
.RE
.PP
@@ -382,7 +398,7 @@ The pathname of the file which is recorded in the index\&.
.sp
\fIgit ls\-files\fR can use a list of "exclude patterns" when traversing the directory tree and finding files to show when the flags \-\-others or \-\-ignored are specified\&. \fBgitignore\fR(5) specifies the format of exclude patterns\&.
.sp
-These exclude patterns come from these places, in order:
+Generally, you should just use \-\-exclude\-standard, but for historical reasons the exclude patterns can be specified from the following places, in order:
.sp
.RS 4
.ie n \{\