git-ls-files
List files in index and working tree
TLDR
List tracked files
SYNOPSIS
git ls-files [options] [files]
DESCRIPTION
git ls-files lists files in the index and working tree. It can show tracked, untracked, ignored, modified, and deleted files, making it valuable for scripting and automation.
The command provides low-level access to Git's file tracking state. Various flags control which file categories to display. It is commonly used in scripts to enumerate files matching certain criteria, such as finding all untracked files or listing everything ignored by `.gitignore`.
PARAMETERS
--cached, -c
Show staged files (default).--modified, -m
Show modified files.--deleted, -d
Show deleted files.--others, -o
Show untracked files.--ignored
Show ignored files.--exclude-standard
Use standard exclusions.--stage, -s
Show staging info.--help
Display help information.
CAVEATS
Shows index state, not commits. Output format varies by options. Useful for scripting.
HISTORY
git ls-files is a core Git plumbing command for inspecting the index, used both directly and by other git commands.
SEE ALSO
git-status(1), git-ls-tree(1)
