| name | git-dev-merge |
| description | Merge feature branches back to their base branches across the main repo and submodules. Use when user says "merge feature", "finish feature", "merge back", or invokes /git-dev-merge. |
Git Dev Merge
Merge feature branches back to their base branches across the main repo and submodules.
Repository Layout
- Main repo:
origin → github.com:bluredengine/blured.git, base branch main
- godot/ submodule:
origin → github.com:bluredengine/godot.git, base branch main
- opencode/ submodule:
origin → github.com:bluredengine/opencode.git, base branch main
The script auto-detects the workspace root from its own location.
Workflow
ALWAYS use the script (from any workspace):
bash "<workspace>/.claude/skills/git-dev-merge/scripts/merge.sh" "<feature-branch>" "<issue-number>"
Both arguments are optional:
- If
<feature-branch> is omitted, auto-detects from the current branch in the main repo
- If
<issue-number> is omitted, no issue is closed
Examples
bash "<workspace>/.claude/skills/git-dev-merge/scripts/merge.sh"
bash "<workspace>/.claude/skills/git-dev-merge/scripts/merge.sh" "feature/7-ai-mesh-generation" "7"
What the Script Does
- Pushes pending changes first — use
/git-pushing before running this if there are uncommitted changes
- Merges godot/ submodule:
feature/<branch> → main, deletes feature branch
- Merges opencode/ submodule:
feature/<branch> → main, deletes feature branch
- Updates submodule refs in the main repo
- Merges main repo:
feature/<branch> → main, deletes feature branch
- Closes the GitHub issue (if issue number provided)
- Shows merge summary
Post-Merge Cleanup
After running the script, also:
- Remove the "Current Work Session" section from
CLAUDE.local.md if it exists
- Report the merge summary to the user
Handling Conflicts
- If a merge conflict occurs in any repo, the script stops and reports the error
- Do NOT force merge or discard changes
- Let the user resolve manually, then re-run
Important Rules
- Always merge submodules BEFORE the main repo
- Use
--no-ff to preserve merge history
- Use
--no-verify when pushing submodules (upstream hooks may fail on forks)
- Delete feature branches from both local and remote after merge
- If a submodule feature branch has no changes, just delete it (no merge needed)
- Push any uncommitted work before starting the merge process