]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/git-ls-tree.txt
Document git aliases support
[thirdparty/git.git] / Documentation / git-ls-tree.txt
CommitLineData
2cf565c5
DG
1git-ls-tree(1)
2==============
2cf565c5
DG
3
4NAME
5----
7bd7f280 6git-ls-tree - Lists the contents of a tree object
2cf565c5
DG
7
8
9SYNOPSIS
10--------
cb85bfe5
EW
11'git-ls-tree' [-d] [-r] [-t] [-z]
12 [--name-only] [--name-status] [--full-name] [--abbrev=[<n>]]
13 <tree-ish> [paths...]
2cf565c5
DG
14
15DESCRIPTION
16-----------
7b9b4c45
PB
17Lists the contents of a given tree object, like what "/bin/ls -a" does
18in the current working directory. Note that the usage is subtly different,
19though - 'paths' denote just a list of patterns to match, e.g. so specifying
20directory name (without '-r') will behave differently, and order of the
21arguments does not matter.
2cf565c5
DG
22
23OPTIONS
24-------
25<tree-ish>::
2c6e4771 26 Id of a tree-ish.
2cf565c5 27
6af1f019 28-d::
7b9b4c45 29 Show only the named tree entry itself, not its children.
6af1f019 30
2cf565c5 31-r::
7b9b4c45
PB
32 Recurse into sub-trees.
33
34-t::
35 Show tree entries even when going to recurse them. Has no effect
36 if '-r' was not passed. '-d' implies '-t'.
2cf565c5
DG
37
38-z::
7b9b4c45
PB
39 \0 line termination on output.
40
41--name-only::
42--name-status::
43 List only filenames (instead of the "long" output), one per line.
2cf565c5 44
cb85bfe5
EW
45--abbrev[=<n>]::
46 Instead of showing the full 40-byte hexadecimal object
47 lines, show only handful hexdigits prefix.
48 Non default number of digits can be specified with --abbrev=<n>.
49
6d3a5077 50paths::
7b9b4c45
PB
51 When paths are given, show them (note that this isn't really raw
52 pathnames, but rather a list of patterns to match). Otherwise
53 implicitly uses the root level of the tree as the sole path argument.
6af1f019 54
6d3a5077 55
2cf565c5
DG
56Output Format
57-------------
6af1f019 58 <mode> SP <type> SP <object> TAB <file>
2cf565c5 59
7b9b4c45
PB
60When the `-z` option is not used, TAB, LF, and backslash characters
61in pathnames are represented as `\t`, `\n`, and `\\`, respectively.
d88156e9 62
2cf565c5
DG
63
64Author
65------
7b9b4c45
PB
66Written by Petr Baudis <pasky@suse.cz>
67Completely rewritten from scratch by Junio C Hamano <junkio@cox.net>,
68another major rewrite by Linus Torvalds <torvalds@osdl.org>
2cf565c5
DG
69
70Documentation
71--------------
7b9b4c45
PB
72Documentation by David Greaves, Junio C Hamano and the git-list
73<git@vger.kernel.org>.
74
75This manual page is a stub. You can help the git documentation by expanding it.
2cf565c5
DG
76
77GIT
78---
a7154e91 79Part of the gitlink:git[7] suite
2cf565c5 80