How does git ls-files
and git sparse-checkout
behave together?
After doing a sparse checkout, I would like to calculate the number of files. If I use git ls-files | wc -l
it will give me the same number as if the full repo was checked out. Is this by design? How can I limit the ls-files
to only list files that are checked out?