From b17e204669650763882d520a660b5e0f3d2d7062 Mon Sep 17 00:00:00 2001 From: dyegoaurelio <42411160+dyegoaurelio@users.noreply.github.com> Date: Tue, 3 Oct 2023 10:58:38 -0300 Subject: [PATCH] git ls-tree: print the filenames of the current branch head in a tree structure (#10790) --- pages/common/git-ls-tree.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pages/common/git-ls-tree.md b/pages/common/git-ls-tree.md index ba67e6878..6d4a0eb08 100644 --- a/pages/common/git-ls-tree.md +++ b/pages/common/git-ls-tree.md @@ -14,3 +14,7 @@ - List only the filenames of the tree on a commit: `git ls-tree --name-only {{commit_hash}}` + +- Print the filenames of the current branch head in a tree structure (Note: `tree --fromfile` is not supported on Windows): + +`git ls-tree -r --name-only HEAD | tree --fromfile`