git ls-tree(List Git Tree)
GIT ls-tree CommandThis command works similar to the ls commands on windows, linux and mac. It takes many parameter the most important being a treeish.
List the tree using the HEAD. Remember, the head points to the last commit on the current branch.
git ls-tree HEAD
In this example we are listing the content of the src directory.
List Directory Content
git ls-tree HEAD srcList the content of the master branch one commit ago(parent commit)
git ls-tree master^ src
Note in the screenshot that that "src" directory itself is a tree while the others are blog. As a result we can reference the src directory by passing the tree has id.