path: root/Documentation/git-ls-files.txt
diff options
Diffstat (limited to 'Documentation/git-ls-files.txt')
1 files changed, 100 insertions, 0 deletions
diff --git a/Documentation/git-ls-files.txt b/Documentation/git-ls-files.txt
new file mode 100644
index 0000000..2face87
--- /dev/null
+++ b/Documentation/git-ls-files.txt
@@ -0,0 +1,100 @@
+v0.1, May 2005
+git-ls-files - Information about files in the cache/working directory
+'git-ls-files' [-z] [-t]
+ (--[cached|deleted|others|ignored|stage|unmerged])\*
+ (-[c|d|o|i|s|u])\*
+ [-x <pattern>|--exclude=<pattern>]
+ [-X <file>|--exclude-from=<file>]
+This merges the file listing in the directory cache index with the
+actual working directory list, and shows different combinations of the
+One or more of the options below may be used to determine the files
+ Show cached files in the output (default)
+ Show deleted files in the output
+ Show other files in the output
+ Show ignored files in the output
+ Note the this also reverses any exclude list present.
+ Show stage files in the output
+ Show unmerged files in the output (forces --stage)
+ \0 line termination on output
+ Skips files matching pattern.
+ Note that pattern is a shell wildcard pattern.
+ exclude patterns are read from <file>; 1 per line.
+ Allows the use of the famous dontdiff file as follows to find
+ out about uncommitted files just as dontdiff is used with
+ the diff command:
+ git-ls-files --others --exclude-from=dontdiff
+ Identify the file status with the following tags (followed by
+ a space) at the start of each line:
+ H cached
+ M unmerged
+ R removed/deleted
+ ? other
+show files just outputs the filename unless '--stage' is specified in
+which case it outputs:
+ [<tag> ]<mode> <object> <stage> <file>
+"git-ls-files --unmerged" and "git-ls-files --stage" can be used to examine
+detailed information on unmerged paths.
+For an unmerged path, instead of recording a single mode/SHA1 pair,
+the dircache records up to three such pairs; one from tree O in stage
+1, A in stage 2, and B in stage 3. This information can be used by
+the user (or Cogito) to see what should eventually be recorded at the
+path. (see read-cache for more information on state)
+see also: link:read-cache.html[read-cache]
+Written by Linus Torvalds <>
+Documentation by David Greaves, Junio C Hamano and the git-list <>.
+Part of the link:git.html[git] suite