manage-submodules
Installation
SKILL.md
Manage Submodules
Objective
Make the superproject's gitlink, .gitmodules, local submodule config, nested checkout, and expected remote relationship consistent.
Use When
- Add or remove a submodule.
- Initialize/update recursive submodules or switch their tracked branch policy.
- Diagnose detached submodule HEAD, dirty submodule state, missing commit, changed URL, or nested recursion.
- Move a submodule path or repair synchronization after
.gitmoduleschanges.
Do Not Use / Route Elsewhere
- Use
manage-remotesfor the superproject's remotes. - Use
setup-repositoryfor a normal standalone clone. - Do not use for ordinary directories, Git subtree integration, vendor-branch merges, or monorepo package management; route subtree/vendor synchronization to
integrate-branches. - Do not commit nested repository content as ordinary files accidentally.