table of contents
GIT-LS-TREE(1) | Git Manual | GIT-LS-TREE(1) |
NAME¶
git-ls-tree - List the contents of a tree object
SYNOPSIS¶
git ls-tree [-d] [-r] [-t] [-l] [-z]
[--name-only] [--name-status] [--full-name] [--full-tree] [--abbrev=[<n>]]
<tree-ish> [paths...]
DESCRIPTION¶
Lists the contents of a given tree object, like what "/bin/ls -a" does in the current working directory. Note that:
OPTIONS¶
<tree-ish>
-d
-r
-t
-l, --long
-z
--name-only, --name-status
--abbrev[=<n>]
--full-name
--full-tree
paths
OUTPUT FORMAT¶
<mode> SP <type> SP <object> TAB <file>
Unless the -z option is used, TAB, LF, and backslash characters in pathnames are represented as \t, \n, and \\, respectively. This output format is compatible with what --index-info --stdin of git update-index expects.
When the -l option is used, format changes to
<mode> SP <type> SP <object> SP <object size> TAB <file>
Object size identified by <object> is given in bytes, and right-justified with minimum width of 7 characters. Object size is given only for blobs (file) entries; for other entries - character is used in place of size.
AUTHOR¶
Written by Petr Baudis <pasky@suse.cz[1]> Completely rewritten from scratch by Junio C Hamano <gitster@pobox.com[2]>, another major rewrite by Linus Torvalds <torvalds@osdl.org[3]>
DOCUMENTATION¶
Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org[4]>.
GIT¶
Part of the git(1) suite
NOTES¶
- 1.
- pasky@suse.cz
- 2.
- gitster@pobox.com
- 3.
- torvalds@osdl.org
- 4.
- git@vger.kernel.org
02/03/2020 | Git 1.7.1 |