Files

ls-files

# 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
# List untracked ignored files, based upon .gitignore.
git ls-files -io --exclude-from=.gitignore

cat-file

# 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>