git-partial-submodule
September 4, 2021 · Comments
Have you ever thought about adding a submodule to your git project, but you didn’t want to bear the burden of downloading and storing the submodule’s entire history, or you only need a handful of files out of the submodule?
Git provides partial clone
and sparse checkout
features that can make this happen for top-level repositories, but so far they aren’t available for
submodules. That’s a hole I aimed to fill with this project. git-partial-submodule is a tool for
setting up submodules with blobless clones. It can also save sparse-checkout patterns in your
.gitmodules
file, allowing them to be managed by version control, and automatically applied when
the submodules are cloned.