Can sparse-checkout patterns be added to .gitmodules?

1.6k views Asked by At

Let's say I have a git submodule and I want to to enable sparse-checkout on it. Is it possible to do so and add that file to the repository for other people that clone? The git submodule gets added to /.gitmodules but the sparse checkout file for that submodule is in .git/modules/foo/info/sparse-checkout? How can I configure a git submodule such that when other people clone with --recursive they only get the whitelisted directories? How can I save the configuration of sparse-checkout on submodules into the repo?

0

There are 0 answers