Get the folder structure of the remote git repository

I want to fetch the folder structure of a remote git repo of huge size (Unreal Engine), so fetching and then analyzing is not a solution. Is there any built-in mechanism or any way to use remote git repo data to do it? I know that I can crawl GitHub and build the folder structure that way, but it seems clumsy and slow.

I looked at the git docs, but didn't find any useful commands or even closely related stuff.


  • if you have access to Unreal Engine repo, you can use a GitHub Codespace and then run git ls-files and you will find a directory listing.

    here's one for a repo I have in a codespace.