An agentic AI workflow skill for managing lightweight, stacked git feature branches using double-dash (--) naming conventions.
Author: Mwila (@swengineermwi)
When working on a primary feature in GitFlow, developers frequently discover complementary, auxiliary, or dependent tasks (e.g. database schema migrations, utility helpers, secondary endpoints).
Traditional GitFlow forces a lose-lose choice:
- Bloated Branches: Mix unrelated changes into a single branch, producing messy, hard-to-review commits.
- Context Interruption: Stop momentum to run a full GitFlow cycle (PR, CI build, review, merge into
develop, re-branching offdevelop), destroying developer velocity.
The Stacked Git Workflow allows developers and AI coding agents to spawn lightweight sub-branches directly off active feature branches using double-dashes (--):
feat/payments
└── feat/payments--account-social-profile-update-endpoint
└── feat/payments--account-social-profile-update-endpoint--db-doc-copy
- Zero-Friction Context Isolation: Keeps complementary work cleanly modularized.
- Fast Local Collapse: When completed, leaf branches unwind and merge back up layer-by-layer without engaging full PR/CI overhead.
- Clean Cascade Promotion: Fully tested, combined feature stacks promote cleanly into
developandmain.
To install this skill in any project using Google Antigravity (AGY CLI / IDE):
mkdir -p .agents/skills/stacked-git-workflow && \
curl -sSL https://raw.githubusercontent.com/swengineermwi/antigravity-stacked-git-skill/main/SKILL.md \
-o .agents/skills/stacked-git-workflow/SKILL.mdWhen a nested sub-task is completed:
- Unwind Leaf: Merge
...--subtaskinto its direct parent branch. - Prune: Delete the merged child branch locally (
git branch -d) and remotely (git push origin --delete). - Cascade Up: Repeat steps 1-2 up the stack to the base feature,
develop, andmain.
graph TD
Subchild["Layer 2: feat/...--endpoint--db-doc-copy"] -->|1. Merge & Prune| Child["Layer 1: feat/...--endpoint"]
Child -->|2. Merge & Prune| Base["Base Feature: feat/payments"]
Base -->|3. Merge & Prune| Dev["develop"]
Dev -->|4. Merge| Main["main"]
MIT © Mwila