GIT-LS-TREE(1) Git Manual GIT-LS-TREE(1) (NAME) git-ls-tree - (SYNOPSIS) git ls-tree [-d] [-r] [-t] [-l] [-z] [--name-only] [--name-status] [--object-only] [--full-name] [--full-tree] [--abbrev[=]] [--format=] [...] (DESCRIPTION) "/bin/ls -a" . : o "/bin/ls" ( -r) . o "/bin/ls" . sub dir git ls-tree -r HEAD dir ( sub/dir HEAD ). ( git ls-tree -r HEAD:sub dir) sub/sub/dir HEAD . --full-tree . (OPTIONS) (tree-ish). -d . -r (sub-trees). -t . -r . -d -t . -l, --long blob (). -z \0 . << (OUTPUT FORMAT)>> . --name-only, --name-status ( "") . --object-only . --object-only . --name-only --name-status . --format='%(objectname)' . --abbrev[=] . --abbrev= . --full-name . --full-tree . --full-name . --format= %(fieldname) . %% % %xNN ( NN ) NN %x00 \0 (NUL) %x09 \t (TAB) %x0a \n (LF) . --format --long --name-only --object-only . [...] ( ). . (OUTPUT FORMAT) ls-tree --format --name-only ( --format ). --format . --format ls-tree . : %(objectmode) %(objecttype) %(objectname)%x09%(path) --index-info --stdin git update-index . -l : %(objectmode) %(objecttype) %(objectname) %(objectsize:padded)%x09%(path) . blob () - . -z "" core.quotePath ( git- config(1) ). -z NUL . : --format %(fieldname) . "objectname" "path" "--format" : git ls-tree --format='%(objectname) %(path)' (FIELD NAMES) . : objectmode (mode) . objecttype (commit blob tree). objectname . objectsize[:padded] blob ( commit tree "-"). "%(objectsize:padded)" . path (pathname) . (SEE ALSO) git-update-index(1), git-config(1) (GIT) git(1) Git 2.55.0 2026-06-29 GIT-LS-TREE(1)