/usr/share/doc/git
NameSizeModeActions
contrib/-0755rm
howto/-0755rm
RelNotes/-0755rm
technical/-0755rm
blame-options.txt60010644editdlrm
cmds-ancillaryinterrogators.txt12940644editdlrm
cmds-ancillarymanipulators.txt7460644editdlrm
cmds-developerinterfaces.txt6780644editdlrm
cmds-foreignscminterface.txt3990644editdlrm
cmds-guide.txt8330644editdlrm
cmds-mainporcelain.txt30330644editdlrm
cmds-plumbinginterrogators.txt15390644editdlrm
cmds-plumbingmanipulators.txt14100644editdlrm
cmds-purehelpers.txt12680644editdlrm
cmds-synchelpers.txt4490644editdlrm
cmds-synchingrepositories.txt3970644editdlrm
cmds-userinterfaces.txt5070644editdlrm
CODE_OF_CONDUCT.md59890644editdlrm
config.txt180010644editdlrm
date-formats.txt11720644editdlrm
diff-format.txt65730644editdlrm
diff-generate-patch.txt72530644editdlrm
diff-options.txt324360644editdlrm
docbook-xsl.css45570644editdlrm
everyday.html169960644editdlrm
fetch-options.txt122810644editdlrm
fsck-msgids.txt41970644editdlrm
git-add.html403690644editdlrm
git-add.txt161640644editdlrm
git-am.html331610644editdlrm
git-am.txt93170644editdlrm
git-annotate.html283910644editdlrm
git-annotate.txt7710644editdlrm
git-apply.html334070644editdlrm
git-apply.txt109500644editdlrm
git-archive.html298560644editdlrm
git-archive.txt84910644editdlrm
git-bisect-lk2009.html812430644editdlrm
git-bisect-lk2009.txt496940644editdlrm
git-bisect.html405720644editdlrm
git-bisect.txt179050644editdlrm
git-blame.html425010644editdlrm
git-blame.txt87320644editdlrm
git-branch.html482530644editdlrm
git-branch.txt157480644editdlrm
git-bugreport.html205090644editdlrm
git-bugreport.txt24210644editdlrm
git-bundle.html332690644editdlrm
git-bundle.txt117030644editdlrm
git-cat-file.html386610644editdlrm
git-cat-file.txt136150644editdlrm
git-check-attr.html226330644editdlrm
git-check-attr.txt33900644editdlrm
git-check-ignore.html231350644editdlrm
git-check-ignore.txt41560644editdlrm
git-check-mailmap.html188160644editdlrm
git-check-mailmap.txt11080644editdlrm
git-check-ref-format.html240400644editdlrm
git-check-ref-format.txt50340644editdlrm
git-checkout-index.html253620644editdlrm
git-checkout-index.txt56690644editdlrm
git-checkout.html527190644editdlrm
git-checkout.txt223620644editdlrm
git-cherry-pick.html310650644editdlrm
git-cherry-pick.txt87640644editdlrm
git-cherry.html224230644editdlrm
git-cherry.txt36150644editdlrm
git-clean.html239810644editdlrm
git-clean.txt45230644editdlrm
git-clone.html443280644editdlrm
git-clone.txt147720644editdlrm
git-column.html233170644editdlrm
git-column.txt22010644editdlrm
git-commit-graph.html261470644editdlrm
git-commit-graph.txt59490644editdlrm
git-commit-tree.html266830644editdlrm
git-commit-tree.txt27100644editdlrm
git-commit.html571540644editdlrm
git-commit.txt215750644editdlrm
git-config.html4155400644editdlrm
git-config.txt197550644editdlrm
git-contacts.html207180644editdlrm
git-contacts.txt25840644editdlrm
git-count-objects.html189460644editdlrm
git-count-objects.txt13500644editdlrm
git-credential-cache--daemon.html181820644editdlrm
git-credential-cache--daemon.txt8910644editdlrm
git-credential-cache.html201800644editdlrm
git-credential-cache.txt24840644editdlrm
git-credential-store.html220430644editdlrm
git-credential-store.txt36370644editdlrm
git-credential.html266760644editdlrm
git-credential.txt73270644editdlrm
git-describe.html282680644editdlrm
git-describe.txt83190644editdlrm
git-diagnose.html201570644editdlrm
git-diagnose.txt22080644editdlrm
git-diff-files.html791300644editdlrm
git-diff-files.txt12250644editdlrm
git-diff-index.html843510644editdlrm
git-diff-index.txt48110644editdlrm
git-diff-tree.html1160520644editdlrm
git-diff-tree.txt41840644editdlrm
git-diff.html1070930644editdlrm
git-diff.txt80390644editdlrm
git-difftool.html270480644editdlrm
git-difftool.txt46240644editdlrm
git-fast-export.html316500644editdlrm
git-fast-export.txt112820644editdlrm
git-fast-import.html1032830644editdlrm
git-fast-import.txt599630644editdlrm
git-fetch-pack.html232550644editdlrm
git-fetch-pack.txt42480644editdlrm
git-fetch.html754560644editdlrm
git-fetch.txt118120644editdlrm
git-filter-branch.html546480644editdlrm
git-filter-branch.txt310310644editdlrm
git-fmt-merge-msg.html214350644editdlrm
git-fmt-merge-msg.txt19310644editdlrm
git-for-each-ref.html434380644editdlrm
git-for-each-ref.txt170730644editdlrm
git-for-each-repo.html192960644editdlrm
git-for-each-repo.txt15430644editdlrm
git-format-patch.html818420644editdlrm
git-format-patch.txt288760644editdlrm
git-fsck-objects.html173920644editdlrm
git-fsck-objects.txt3540644editdlrm
git-fsck.html391620644editdlrm
git-fsck.txt58820644editdlrm
git-fsmonitor--daemon.html228750644editdlrm
git-fsmonitor--daemon.txt36100644editdlrm
git-gc.html366970644editdlrm
git-gc.txt62920644editdlrm
git-get-tar-commit-id.html178350644editdlrm
git-get-tar-commit-id.txt7530644editdlrm
git-grep.html360300644editdlrm
git-grep.txt107630644editdlrm
git-hash-object.html199390644editdlrm
git-hash-object.txt21420644editdlrm
git-help.html281410644editdlrm
git-help.txt75270644editdlrm
git-hook.html188070644editdlrm
git-hook.txt10280644editdlrm
git-http-backend.html309740644editdlrm
git-http-backend.txt114720644editdlrm
git-http-fetch.html196790644editdlrm
git-http-fetch.txt17750644editdlrm
git-http-push.html213910644editdlrm
git-http-push.txt29950644editdlrm
git-imap-send.html254720644editdlrm
git-imap-send.txt35670644editdlrm
git-index-pack.html247350644editdlrm
git-index-pack.txt52050644editdlrm
git-init-db.html174600644editdlrm
git-init-db.txt4090644editdlrm
git-init.html266040644editdlrm
git-init.txt58690644editdlrm
git-interpret-trailers.html420060644editdlrm
git-interpret-trailers.txt185790644editdlrm
git-log.html1824850644editdlrm
git-log.txt68640644editdlrm
git-ls-files.html350530644editdlrm
git-ls-files.txt116220644editdlrm
git-ls-remote.html243490644editdlrm
git-ls-remote.txt48410644editdlrm
git-ls-tree.html256280644editdlrm
git-ls-tree.txt55150644editdlrm
git-mailinfo.html234020644editdlrm
git-mailinfo.txt38660644editdlrm
git-mailsplit.html192640644editdlrm
git-mailsplit.txt13420644editdlrm
git-maintenance.html460000644editdlrm
git-maintenance.txt189010644editdlrm
git-merge-base.html283800644editdlrm
git-merge-base.txt77590644editdlrm
git-merge-file.html226560644editdlrm
git-merge-file.txt37180644editdlrm
git-merge-index.html204500644editdlrm
git-merge-index.txt24450644editdlrm
git-merge-one-file.html174160644editdlrm
git-merge-one-file.txt3870644editdlrm
git-merge-tree.html334960644editdlrm
git-merge-tree.txt119230644editdlrm
git-merge.html710050644editdlrm
git-merge.txt150680644editdlrm
git-mergetool--lib.html191270644editdlrm
git-mergetool--lib.txt14670644editdlrm
git-mergetool.html397950644editdlrm
git-mergetool.txt44730644editdlrm
git-mktag.html198190644editdlrm
git-mktag.txt17820644editdlrm
git-mktree.html184740644editdlrm
git-mktree.txt10750644editdlrm
git-multi-pack-index.html235950644editdlrm
git-multi-pack-index.txt46320644editdlrm
git-mv.html200920644editdlrm
git-mv.txt21030644editdlrm
git-name-rev.html216700644editdlrm
git-name-rev.txt33520644editdlrm
git-notes.html410460644editdlrm
git-notes.txt138660644editdlrm
git-pack-objects.html423910644editdlrm
git-pack-objects.txt192970644editdlrm
git-pack-redundant.html197990644editdlrm
git-pack-redundant.txt18760644editdlrm
git-pack-refs.html211200644editdlrm
git-pack-refs.txt31360644editdlrm
git-patch-id.html203540644editdlrm
git-patch-id.txt24300644editdlrm
git-prune-packed.html185390644editdlrm
git-prune-packed.txt9460644editdlrm
git-prune.html203270644editdlrm
git-prune.txt19190644editdlrm
git-pull.html770700644editdlrm
git-pull.txt83540644editdlrm
git-push.html749930644editdlrm
git-push.txt280610644editdlrm
git-quiltimport.html194660644editdlrm
git-quiltimport.txt16930644editdlrm
git-range-diff.html316730644editdlrm
git-range-diff.txt103370644editdlrm
git-read-tree.html390780644editdlrm
git-read-tree.txt168970644editdlrm
git-rebase.html989450644editdlrm
git-rebase.txt472280644editdlrm
git-receive-pack.html304480644editdlrm
git-receive-pack.txt95260644editdlrm
git-reflog.html235140644editdlrm
git-reflog.txt45750644editdlrm
git-remote-ext.html230120644editdlrm
git-remote-ext.txt39770644editdlrm
git-remote-fd.html195010644editdlrm
git-remote-fd.txt16280644editdlrm
git-remote-helpers.html169740644editdlrm
git-remote.html299030644editdlrm
git-remote.txt87680644editdlrm
git-repack.html328190644editdlrm
git-repack.txt110200644editdlrm
git-replace.html248580644editdlrm
git-replace.txt52110644editdlrm
git-request-pull.html202950644editdlrm
git-request-pull.txt20350644editdlrm
git-rerere.html270400644editdlrm
git-rerere.txt77810644editdlrm
git-reset.html445200644editdlrm
git-reset.txt191250644editdlrm
git-restore.html281660644editdlrm
git-restore.txt70820644editdlrm
git-rev-list.html1181280644editdlrm
git-rev-list.txt32200644editdlrm
git-rev-parse.html646410644editdlrm
git-rev-parse.txt158400644editdlrm
git-revert.html267920644editdlrm
git-revert.txt54210644editdlrm
git-rm.html275840644editdlrm
git-rm.txt72360644editdlrm
git-send-pack.html245760644editdlrm
git-send-pack.txt51600644editdlrm
git-sh-i18n--envsubst.html181660644editdlrm
git-sh-i18n--envsubst.txt9280644editdlrm
git-sh-i18n.html185950644editdlrm
git-sh-i18n.txt11470644editdlrm
git-sh-setup.html212770644editdlrm
git-sh-setup.txt29760644editdlrm
git-shell.html214140644editdlrm
git-shell.txt29810644editdlrm
git-shortlog.html646180644editdlrm
git-shortlog.txt44090644editdlrm
git-show-branch.html268130644editdlrm
git-show-branch.txt65890644editdlrm
git-show-index.html195210644editdlrm
git-show-index.txt14730644editdlrm
git-show-ref.html260750644editdlrm
git-show-ref.txt66480644editdlrm
git-show.html1116440644editdlrm
git-show.txt19290644editdlrm
git-sparse-checkout.html439490644editdlrm
git-sparse-checkout.txt212580644editdlrm
git-stage.html173410644editdlrm
git-stage.txt2990644editdlrm
git-stash.html385940644editdlrm
git-stash.txt149990644editdlrm
git-status.html457180644editdlrm
git-status.txt202950644editdlrm
git-stripspace.html200160644editdlrm
git-stripspace.txt19460644editdlrm
git-submodule.html455810644editdlrm
git-submodule.txt208190644editdlrm
git-subtree.html368230644editdlrm
git-subtree.txt136870644editdlrm
git-switch.html333140644editdlrm
git-switch.txt86070644editdlrm
git-symbolic-ref.html204520644editdlrm
git-symbolic-ref.txt23270644editdlrm
git-tag.html389580644editdlrm
git-tag.txt134690644editdlrm
git-tools.html172070644editdlrm
git-tools.txt4220644editdlrm
git-unpack-file.html176450644editdlrm
git-unpack-file.txt4340644editdlrm
git-unpack-objects.html188110644editdlrm
git-unpack-objects.txt12200644editdlrm
git-update-index.html497230644editdlrm
git-update-index.txt239280644editdlrm
git-update-ref.html259090644editdlrm
git-update-ref.txt62980644editdlrm
git-update-server-info.html182550644editdlrm
git-update-server-info.txt8010644editdlrm
git-upload-archive.html197760644editdlrm
git-upload-archive.txt20870644editdlrm
git-upload-pack.html216710644editdlrm
git-upload-pack.txt29980644editdlrm
git-var.html215370644editdlrm
git-var.txt31760644editdlrm
git-verify-commit.html179480644editdlrm
git-verify-commit.txt5750644editdlrm
git-verify-pack.html189530644editdlrm
git-verify-pack.txt11110644editdlrm
git-verify-tag.html179410644editdlrm
git-verify-tag.txt5620644editdlrm
git-version.html177980644editdlrm
git-version.txt5320644editdlrm
git-web--browse.html224050644editdlrm
git-web--browse.txt35760644editdlrm
git-whatchanged.html185720644editdlrm
git-whatchanged.txt10980644editdlrm
git-worktree.html463410644editdlrm
git-worktree.txt209850644editdlrm
git-write-tree.html184410644editdlrm
git-write-tree.txt10260644editdlrm
git.html1072370644editdlrm
git.txt432540644editdlrm
gitattributes.html828450644editdlrm
gitattributes.txt495110644editdlrm
gitcli.html295840644editdlrm
gitcli.txt96970644editdlrm
gitcore-tutorial.html1001390644editdlrm
gitcore-tutorial.txt622400644editdlrm
gitcredentials.html319800644editdlrm
gitcredentials.txt113170644editdlrm
gitdiffcore.html337450644editdlrm
gitdiffcore.txt140820644editdlrm
giteveryday.html380920644editdlrm
giteveryday.txt144220644editdlrm
gitfaq.html440810644editdlrm
gitfaq.txt210690644editdlrm
gitformat-bundle.html214460644editdlrm
gitformat-bundle.txt32560644editdlrm
gitformat-chunk.html243290644editdlrm
gitformat-chunk.txt55600644editdlrm
gitformat-commit-graph.html286300644editdlrm
gitformat-commit-graph.txt78570644editdlrm
gitformat-index.html402690644editdlrm
gitformat-index.txt151800644editdlrm
gitformat-pack.html498110644editdlrm
gitformat-pack.txt235090644editdlrm
gitformat-signature.html273620644editdlrm
gitformat-signature.txt80930644editdlrm
gitglossary.html642010644editdlrm
gitglossary.txt3580644editdlrm
githooks.html565000644editdlrm
githooks.txt293310644editdlrm
gitignore.html283990644editdlrm
gitignore.txt89180644editdlrm
gitmailmap.html228190644editdlrm
gitmailmap.txt35510644editdlrm
gitmodules.html240570644editdlrm
gitmodules.txt48000644editdlrm
gitnamespaces.html221480644editdlrm
gitnamespaces.txt25090644editdlrm
gitprotocol-capabilities.html374250644editdlrm
gitprotocol-capabilities.txt153110644editdlrm
gitprotocol-common.html215650644editdlrm
gitprotocol-common.txt31770644editdlrm
gitprotocol-http.html432340644editdlrm
gitprotocol-http.txt179940644editdlrm
gitprotocol-pack.html530230644editdlrm
gitprotocol-pack.txt276780644editdlrm
gitprotocol-v2.html596900644editdlrm
gitprotocol-v2.txt314340644editdlrm
gitremote-helpers.html482150644editdlrm
gitremote-helpers.txt217850644editdlrm
gitrepository-layout.html393520644editdlrm
gitrepository-layout.txt116220644editdlrm
gitrevisions.html416210644editdlrm
gitrevisions.txt8230644editdlrm
gitsubmodules.html316990644editdlrm
gitsubmodules.txt103660644editdlrm
gittutorial-2.html345470644editdlrm
gittutorial-2.txt147500644editdlrm
gittutorial.html462630644editdlrm
gittutorial.txt229720644editdlrm
gitworkflows.html398690644editdlrm
gitworkflows.txt174140644editdlrm
glossary-content.txt326090644editdlrm
howto-index.html229910644editdlrm
howto-index.txt40010644editdlrm
i18n.txt29400644editdlrm
line-range-format.txt11620644editdlrm
line-range-options.txt7610644editdlrm
merge-options.txt72360644editdlrm
merge-strategies.txt66100644editdlrm
mergetools-diff.txt15070644editdlrm
mergetools-merge.txt25860644editdlrm
MyFirstContribution.html905720644editdlrm
MyFirstContribution.txt545960644editdlrm
MyFirstObjectWalk.html605540644editdlrm
MyFirstObjectWalk.txt289790644editdlrm
object-format-disclaimer.txt4700644editdlrm
pretty-formats.txt156690644editdlrm
pretty-options.txt42010644editdlrm
pull-fetch-param.txt54760644editdlrm
README.md36520644editdlrm
ref-reachability-filters.txt3910644editdlrm
rerere-options.txt4140644editdlrm
rev-list-description.txt25310644editdlrm
rev-list-options.txt469060644editdlrm
ReviewingGuidelines.html268310644editdlrm
ReviewingGuidelines.txt81000644editdlrm
revisions.txt171090644editdlrm
scalar.html260550644editdlrm
scalar.txt60560644editdlrm
sequencer.txt4720644editdlrm
signoff-option.txt7810644editdlrm
SubmittingPatches.html556600644editdlrm
SubmittingPatches.txt301470644editdlrm
ToolsForGit.html190200644editdlrm
ToolsForGit.txt13480644editdlrm
trace2-target-values.txt5290644editdlrm
transfer-data-leaks.txt17120644editdlrm
urls-remotes.txt26420644editdlrm
urls.txt36340644editdlrm
user-manual.html2757310644editdlrm
user-manual.txt1735180644editdlrm
Edit: /usr/share/doc/git/git-ls-tree.html (25628B)
git-ls-tree(1)

SYNOPSIS

git ls-tree [-d] [-r] [-t] [-l] [-z]
            [--name-only] [--name-status] [--object-only] [--full-name] [--full-tree] [--abbrev[=<n>]] [--format=<format>]
            <tree-ish> [<path>…]

DESCRIPTION

Lists the contents of a given tree object, like what "/bin/ls -a" does in the current working directory. Note that:

  • the behaviour is slightly different from that of "/bin/ls" in that the <path> denotes just a list of patterns to match, e.g. so specifying directory name (without -r) will behave differently, and order of the arguments does not matter.

  • the behaviour is similar to that of "/bin/ls" in that the <path> is taken as relative to the current working directory. E.g. when you are in a directory sub that has a directory dir, you can run git ls-tree -r HEAD dir to list the contents of the tree (that is sub/dir in HEAD). You don’t want to give a tree that is not at the root level (e.g. git ls-tree -r HEAD:sub dir) in this case, as that would result in asking for sub/sub/dir in the HEAD commit. However, the current working directory can be ignored by passing --full-tree option.

OPTIONS

<tree-ish>

Id of a tree-ish.

-d

Show only the named tree entry itself, not its children.

-r

Recurse into sub-trees.

-t

Show tree entries even when going to recurse them. Has no effect if -r was not passed. -d implies -t.

-l
--long

Show object size of blob (file) entries.

-z

\0 line termination on output and do not quote filenames. See OUTPUT FORMAT below for more information.

--name-only
--name-status

List only filenames (instead of the "long" output), one per line. Cannot be combined with --object-only.

--object-only

List only names of the objects, one per line. Cannot be combined with --name-only or --name-status. This is equivalent to specifying --format='%(objectname)', but for both this option and that exact format the command takes a hand-optimized codepath instead of going through the generic formatting mechanism.

--abbrev[=<n>]

Instead of showing the full 40-byte hexadecimal object lines, show the shortest prefix that is at least <n> hexdigits long that uniquely refers the object. Non default number of digits can be specified with --abbrev=<n>.

--full-name

Instead of showing the path names relative to the current working directory, show the full path names.

--full-tree

Do not limit the listing to the current working directory. Implies --full-name.

--format=<format>

A string that interpolates %(fieldname) from the result being shown. It also interpolates %% to %, and %xNN where NN are hex digits interpolates to character with hex code NN; for example %x00 interpolates to \0 (NUL), %x09 to \t (TAB) and %x0a to \n (LF). When specified, --format cannot be combined with other format-altering options, including --long, --name-only and --object-only.

[<path>…]

When paths are given, show them (note that this isn’t really raw pathnames, but rather a list of patterns to match). Otherwise implicitly uses the root level of the tree as the sole path argument.

Output Format

The output format of ls-tree is determined by either the --format option, or other format-altering options such as --name-only etc. (see --format above).

The use of certain --format directives is equivalent to using those options, but invoking the full formatting machinery can be slower than using an appropriate formatting option.

In cases where the --format would exactly map to an existing option ls-tree will use the appropriate faster path. Thus the default format is equivalent to:

%(objectmode) %(objecttype) %(objectname)%x09%(path)

This output format is compatible with what --index-info --stdin of git update-index expects.

When the -l option is used, format changes to

%(objectmode) %(objecttype) %(objectname) %(objectsize:padded)%x09%(path)

Object size identified by <objectname> 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.

Without the -z option, pathnames with "unusual" characters are quoted as explained for the configuration variable core.quotePath (see git-config(1)). Using -z the filename is output verbatim and the line is terminated by a NUL byte.

Customized format:

It is possible to print in a custom format by using the --format option, which is able to interpolate different fields using a %(fieldname) notation. For example, if you only care about the "objectname" and "path" fields, you can execute with a specific "--format" like

git ls-tree --format='%(objectname) %(path)' <tree-ish>

FIELD NAMES

Various values from structured fields can be used to interpolate into the resulting output. For each outputting line, the following names can be used:

objectmode

The mode of the object.

objecttype

The type of the object (commit, blob or tree).

objectname

The name of the object.

objectsize[:padded]

The size of a blob object ("-" if it’s a commit or tree). It also supports a padded format of size with "%(objectsize:padded)".

path

The pathname of the object.

GIT

Part of the git(1) suite