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?
Can sparse-checkout patterns be added to .gitmodules?
Asked Answered
© 2022 - 2024 — McMap. All rights reserved.
git clone
without--recursive
and then run your script in the fresh clone of the superproject to configure and fetch submodules. – Schrader