Files
holocron/plugins/git/skills/git-submodules
Defame1297 20e5627fd7 fix(git): correct three command claims the plugin got wrong, and give rebase an owner
Three statements were false against the git in use (2.39.5), each verified by
running it.

`git rebase --autosquash HEAD~N` without `-i` is a silent no-op: git prints
"Successfully rebased", the `fixup!` commit survives with the same SHA, and
rewrite-history.md presented that as the preferred flow with `-i` as an optional
review step. The agent reports the squash as done and the `fixup!` subject then
trips this repo's own commit-msg gate. `-i` is now the command, not the alternative.

"Fetch never modifies a local branch, so it is always safe to run" — new text on
this branch — is false: `git fetch origin main:probe` fast-forwarded the local
branch, and a `+` prefix force-updates it, losing commits. The claim is scoped to
the no-refspec form.

`git worktree add --orphan` does not exist before Git 2.42; on 2.39.5 it is
`error: unknown option 'orphan'`, exit 129. The same file gives a version floor for
`--recurse-submodules` three sections earlier. Floor added, with a fallback that
was tested before being documented.

git-workflow claimed "every request resolves to exactly one of these six" while
rebase, reset and stash were owned by no skill — `git reset` appeared nowhere in
the plugin, old tree or new — so "undo my last commit" routed nowhere. The claim is
gone, the router gains rows for all three, and the procedures now exist: plain
rebase with `--onto` and conflict handling, a reset mode table gated on `--hard`,
and stash save/pop/list/drop. `--hard` gets an always-loaded Gotcha, matching the
register the force-push refusal already sets.

Cherry-pick had three claimants pointing at git-history while git-commits owned the
flow, and the two copies were not equivalent — git-history's lacked the destination
check, the rtk prefix and `--abort`. Resolved to git-commits per #112; the weaker
duplicate is replaced by a hand-off.

git-commits' metadata.version was deleted rather than bumped in 14af50b, leaving two
house-contract documents citing a worked v0.1.2 to v0.1.3 transition against a file
declaring no version. Restored to 0.1.3.

Also: the divergent-pull explanation stated a `--ff-only` default that does not
exist (it is a hard error); `--remote` "requires" a configured branch where it uses
one; `git push origin --delete` moved to git-remotes, which owns the remote-side
gates; seven retired `git:<name>` source slugs; git-orchestrate quoted a
git-workflow sentence that no longer exists; git-submodules regains the indirect
trigger that made "add a dependency repo" routable; and commit atomicity is a common
gate rather than reachable only from the create flow.

Refs: #112, #113
2026-09-01 12:38:38 +00:00
..

git-submodules

Add, initialize, update, pin, inspect, and remove git submodules in multi-repository projects.

What it does

This skill handles submodule operations within the git workflow suite: cloning a superproject with its nested repositories, adding a dependency as a submodule, initializing and updating with pinning or branch tracking, parallel and recursive traversal, rebinding URLs and tracked branches, and the full removal sequence including the .git/modules/ cleanup git leaves behind. It returns structured results suitable for agent composition.

It sits alongside the other git skills rather than duplicating them: git-worktrees covers multiple checkouts of a single repository, and git-remotes covers the superproject's own remotes.

Usage

/git-submodules

Describe the submodule task. The skill applies the shared working rules, dispatches to the reference for that task, and returns structured results (operation, status, per-submodule details, conflicts, and a recovery next_step when applicable).

Files

File Purpose
SKILL.md Skill instructions for agents — gotchas, shared working rules, and the task dispatch table
references/README.md Describes contents of references/
references/setup-and-update.md Loaded when cloning a superproject, adding a submodule, initializing, updating, or re-pinning one, or running a command across all of them — includes the full add and update flag tables, the pinning workflows, and the foreach shell-variable table
references/urls-and-config.md Loaded when changing where a submodule points or how it is configured — .gitmodules vs .git/config anatomy, both key tables, sync/set-url/set-branch, local mirror overrides, relative URLs, the custom-update security gate, and absorbgitdirs
references/removal.md Loaded when removing or deinitializing a submodule — why deinit is not removal, and the four-step removal sequence
references/sources.md Research sources and provenance