Reputation: 2931
In a sparse git checkout, one does not see the folders (directories/trees) that haven't been added via git sparse-checkout add
.
I can still "browse" these folders with git cat-file -p HEAD
and following the tree hashes.
Is there any tool or trick to make this more comfortable?
Upvotes: 0
Views: 30
Reputation: 16122
git show
can also show other objects, not only commits, using <commit>:<path>
as the specification.
For example, git show @:
will list the root tree contents of the HEAD commit, 1 line per file, while git show @:README.txt
will show the contents of the specified file.
To browse the tree interactively, use tig
and press t to open its 'tree' view.
Upvotes: 0
Reputation: 2931
I've created this alias in my git config which is already a good enough solution for me:
[alias]
ls = ls-tree --format='%(objecttype) %(path)' HEAD
It's not nice that:
Upvotes: 0