Skip to main content
GSD supports three branching strategies to fit different workflows: no branches, per-phase branches, or per-milestone branches.

Strategies Overview

Strategy: none (Default)

All commits go directly to your current branch.

Behavior

When to use

  • Solo developer
  • Simple projects with no code review
  • Continuous deployment from main
  • When you trust GSD’s atomic commits

Advantages

  • ✅ Simplest workflow
  • ✅ No branch management overhead
  • ✅ Immediate deployment

Disadvantages

  • ❌ No isolation between phases
  • ❌ Harder to review work in chunks
  • ❌ Rollback requires reverting commits

Strategy: phase

Creates a new branch for each phase, merges at phase completion.

Behavior

When to use

  • Team workflows with code review
  • Want to review each phase before merging
  • Need granular rollback capability
  • CI/CD runs per-phase validation

Advantages

  • ✅ Isolates each phase
  • ✅ Easy code review (one phase = one PR)
  • ✅ Granular rollback (delete branch)
  • ✅ Clear phase boundaries in git history

Disadvantages

  • ❌ More branch management
  • ❌ Merge conflicts if main moves
  • ❌ Requires manual PR creation

Strategy: milestone

Creates one branch for the entire milestone at the first execute-phase, all phases share it.

Behavior

When to use

  • Release branches (v1.0, v2.0)
  • Want one PR per version
  • Milestone is a coherent unit
  • Team reviews entire milestone together

Advantages

  • ✅ Clean release workflow
  • ✅ One PR per milestone
  • ✅ All milestone work isolated
  • ✅ Easy to deploy milestone to staging

Disadvantages

  • ❌ Large PRs (many phases)
  • ❌ Harder to review incrementally
  • ❌ Rollback is all-or-nothing

Configuration

Via interactive settings

Via config file

Edit .planning/config.json:

Template variables

Branch Templates

Default templates

Produces:
  • Phase branch: gsd/phase-01-user-authentication
  • Milestone branch: gsd/v1.0-user-system

Custom templates

Produces:
  • Phase branch: feature/user-authentication-phase-01
  • Milestone branch: release/v1.0

Merging Behavior

Phase strategy

At the start of next phase (or milestone completion):
1

Checkout main

git checkout main
2

Merge phase branch

git merge --no-ff gsd/phase-01-user-authentication
3

Delete phase branch

git branch -d gsd/phase-01-user-authentication
4

Create next phase branch

git checkout -b gsd/phase-02-profile-management
Result: Clean phase boundaries, each phase is a merge commit.

Milestone strategy

At /gsd:complete-milestone:
1

Offer squash merge

“Merge with history or squash all phase commits?”
  • Squash (recommended): One commit for entire milestone
  • History: All phase commits preserved
2

Checkout main

git checkout main
3

Merge milestone branch

git merge --squash gsd/v1.0-user-system (if squash)orgit merge --no-ff gsd/v1.0-user-system (if history)
4

Delete milestone branch

git branch -d gsd/v1.0-user-system

Working with PRs

Phase strategy workflow

Each phase gets its own PR for review.

Milestone strategy workflow

One PR for entire milestone.

Common Patterns

Solo developer

Simplest - all commits to main.

Team with per-phase review

Each phase reviewed in isolation.

Release workflow

Milestones map to releases.

Best Practices

Do:
  • Trust GSD’s atomic commits
  • Use for solo projects
  • Deploy continuously
Don’t:
  • Skip verification (/gsd:verify-work)
  • Use on team projects requiring review

Troubleshooting

”Branch already exists”

You may have an orphaned branch:

“Merge conflicts”

Main branch moved while you were working:

“Switched strategies mid-milestone”

Changing strategies mid-milestone can leave orphaned branches:
Branching strategy changes apply to future phases only. Finish current phase before switching.

Integration with Other Features

Quick mode

Quick tasks respect branching strategy:
  • none: Commits to current branch
  • phase/milestone: Commits to active GSD branch

Decimal phases

Decimal phases (3.1, 3.2) get their own branches in phase strategy:
In milestone strategy, they commit to the existing milestone branch.