# List files in Git.
git ls-files
git ls-files -c
# List modified files.
git ls-files -m
# List other (untracked, ignored, ...) files.
git ls-files -o
git ls-files --others
# List directories other files are in.
git ls-files -o --directory
# List untracked ignored files, based upon .gitignore.
git ls-files -io --exclude-from=.gitignore
# Pretty-print the contents of HEAD.
git cat-file -p HEAD
# Pretty-print the contents of a tree ID (file list), for example the tree ID from -p HEAD.
git cat-file -p <id_from_tree>
# Pretty-print the contents of an ID, for example the parent ID from -p HEAD.
git cat-file -p <id_from_parent>