git-sync-dev-submodules
Installation
SKILL.md
Git Sync Dev Submodules
Overview
- Keep the flow local-first and fast: fetch once, then sync branches with
merge --ff-onlyorrebase. - Default to refreshing
func-coreafter branch sync. - After refresh, attach each selected submodule to the superproject's current branch name at the pinned commit when the superproject is on a branch.
- Use
--skip-submodulesto skip submodule refresh entirely. - Use
--dry-runto preview actions before changing git state.
Scripts
scripts/sync-dev-to-current-branch.sh- Run in any non-detached worktree.
- If current branch is
dev, fast-forward it toorigin/dev. - Otherwise, rebase the current branch onto
origin/dev.
scripts/sync-dev-worktrees.sh- Run from a
devworktree. - Fast-forward the current
devworktree toorigin/dev. - Rebase every other clean, non-detached worktree onto local
dev.
- Run from a