threads / discuss / 63924

Partial-cloning or filtering a submodule

Subject: Partial-cloning or filtering a submodule

## tl;dr

One message between Aug 7, 2025 and Aug 7, 2025.

replies: 0people: 1as markdown or json

Petar Vutov· Aug 7, 2025, 11:34 UTC · lore
When adding a submodule, I usually only need part of the submodule repository.
As far as I know there is currently no support for partial-cloning submodules. Before I try my hand at this, I want to ask if it makes sense as a feature.
I imagine it like this: 
* new `submodule.<name>.filter` field in .gitmodules
* on `submodule update`, the plumbing described at https://git-scm.com/docs/partial-clone is used to filter the specified paths
* if we do `submodule update --recursive`, submodules excluded by the filter-spec are not filled in, maybe they also don't show up in `git submodule status --recursive` etc
Thoughts?

← back to recent threads