I want to access a bare git repository, and I want to list all files in the repository.
On a normal git repository I can easily do that by running git ls-files
git ls-files
You can try the other command which list files:
git ls-tree --full-tree -r HEAD
According to this comment, the command git ls-tree works in bare repo.