Skip to main content
GSD provides flexible git integration with branching strategies, commit automation, and branch naming templates.

Configuration

Set in .planning/config.json:
Update via:

Branching Strategies

string
default:"none"
Controls when and how GSD creates branches:
  • none — Commit directly to current branch (default)
  • phase — Create branch per phase
  • milestone — Create branch for entire milestone

Strategy: None (Default)

Behavior:
  • All commits go to current branch
  • No automatic branch creation
  • Simple, straightforward workflow
Best for:
  • Solo development
  • Trunk-based development
  • Simple projects
  • When you manage branches manually
Example:

Strategy: Phase

Behavior:
  • Creates new branch at start of each execute-phase
  • Branch name from phase_branch_template
  • Offers merge back to base branch at phase completion
  • Next phase branches from base (not previous phase)
Best for:
  • Code review per phase
  • Granular rollback
  • Testing phases independently
  • Team workflows
Example:
Branch Lifecycle:
  1. Phase execution starts
  2. Create branch from current (base)
  3. Execute all plans, commit to branch
  4. Offer merge to base:
    • Squash merge (recommended) — Single commit per phase
    • Merge with history — Preserve individual task commits
  5. Next phase branches from base, not previous phase branch

Strategy: Milestone

Behavior:
  • Creates branch at first execute-phase in milestone
  • All phases commit to same milestone branch
  • Offers merge at complete-milestone
  • Clean release branch workflow
Best for:
  • Release branches
  • PR per version/milestone
  • Feature branches
  • When phases are tightly coupled
Example:
Branch Lifecycle:
  1. First phase execution in milestone
  2. Create milestone branch from current (base)
  3. All subsequent phases commit to milestone branch
  4. At milestone completion, offer merge to base
  5. New milestone creates new branch

Branch Name Templates

Phase Branch Template

string
default:"gsd/phase-{phase}-{slug}"
Template for phase branch names.
Available variables:
  • {phase} — Zero-padded phase number (e.g., “01”, “03”, “12”)
  • {slug} — Lowercase hyphenated phase name
Examples:

Milestone Branch Template

string
default:"gsd/{milestone}-{slug}"
Template for milestone branch names.
Available variables:
  • {milestone} — Version identifier (e.g., “v1.0”, “v2.1”)
  • {slug} — Lowercase hyphenated milestone name
Examples:

Custom Templates

Edit .planning/config.json directly:

Commit Behavior

GSD commits automatically during execution:

Commit Frequency

Every task gets its own commit immediately after completion. Example phase execution:

Commit Message Format

Types:
  • feat — New feature implementation
  • fix — Bug fix
  • refactor — Code refactoring
  • test — Test additions
  • docs — Documentation (plan summaries)
  • chore — Maintenance tasks
Examples:

Planning Docs in Git

boolean
default:"true"
Track .planning/ directory in git.

When Enabled (Default)

Commits include:
  • PROJECT.md, REQUIREMENTS.md, ROADMAP.md
  • Phase plans (XX-YY-PLAN.md)
  • Research findings (XX-RESEARCH.md)
  • Execution summaries (XX-YY-SUMMARY.md)
  • Verification results (XX-VERIFICATION.md)
  • Context and validation docs
Benefits:
  • Full project history
  • Context for future work
  • Audit trail
  • Team visibility
Example commits:

When Disabled

Set when:
  • Working on sensitive/private projects
  • Don’t want planning artifacts in version control
  • .planning/ is in .gitignore
Set via:
Or edit config:
Behavior:
  • Planning docs stay local
  • Only code/tests committed
  • .planning/ in .gitignore auto-disables this
boolean
default:"false"
Add --no-ignore to searches to include .planning/.
Enable when:
  • .planning/ is gitignored
  • Need to search planning docs for context

Merge Strategies

Combines all task commits into single phase/milestone commit. Benefits:
  • Clean, linear history
  • One commit per phase
  • Easy to review
  • Simple to revert
Example:
When offered merge:

Merge with History

Preserves individual task commits. Benefits:
  • Full granular history
  • Git bisect to exact task
  • Detailed audit trail
Drawback:
  • Noisy commit history
  • Many commits per phase
Example:

Git Workflow Examples

Solo Developer (Default)

Team with Phase Reviews

Release Branch Workflow

Atomic Commits

Every task creates an atomic commit: Benefits:
  1. Git bisect — Find exact failing task
  2. Surgical reverts — Undo specific task
  3. Clear history — See what changed when
  4. AI context — Claude reads commit history in future sessions
Example history:
Bisect to find bug:

Safety Features

Always Confirm Destructive

Force pushes, hard resets always require confirmation regardless of mode.

Pre-commit Hooks

GSD respects your pre-commit hooks:
  • Runs hooks before each commit
  • If hook fails, fixes issues and retries
  • Never uses --no-verify

Merge Conflicts

If merge conflict detected:
  1. GSD stops execution
  2. Provides conflict details
  3. Offers manual resolution or abort