Strategies
Each vendored target has a strategy. The default is subtree because it gives the
project a portable, reviewable copy of upstream source.
Subtree
Section titled “Subtree”Use subtree when the source is small enough to commit and you want every clone
of your project to include it.
ingraft add effect --strategy subtreeSubmodule
Section titled “Submodule”Use submodule when the upstream repository is large or you want a pinned git
relationship without copying its contents into your own history.
ingraft add rust-lang/rust --strategy submoduleSubmodules are also the preferred strategy when the vendor is meant to be edited. Use a fork URL and a branch in that fork so vendor patches live as normal commits that can be pushed and upstreamed:
ingraft add your-org/effect --strategy submodule --ref vendor-patchesSee Editable Vendors for the full workflow.
Clone-ignore
Section titled “Clone-ignore”Use clone-ignore when source should exist locally for agents and LSPs but should
not be committed.
ingraft add Effect-TS/effect --strategy clone-ignoreIf the project has a colocated jj repository, the CLI falls back to clone-ignore
because jj does not yet support git subtree and submodule workflows directly.
Filters
Section titled “Filters”Large or irrelevant files can be filtered during vendoring when the strategy supports it:
ingraft add Effect-TS/effect \ --exclude "**/*.png" \ --exclude-dir docs/generated \ --max-file-size 1MBThis keeps non-source artifacts out of the vendor tree when they do not help the coding workflow.
Choosing for Ownership
Section titled “Choosing for Ownership”| Ownership model | Recommended strategy |
|---|---|
| Read-only reference source | subtree |
| Editable vendor with a fork or upstream PR path | submodule |
| Local scratch checkout | clone-ignore |
The default subtree path optimizes for agent visibility. The fork-backed
submodule path optimizes for patch ownership.