Skip to content

Git Workflow Strategies

The core workflow (Spec → Plan → Work → Compound) runs the same regardless of how you manage branches. This guide covers the two git strategies for isolating that work, and when to pick each one.

The default for most tasks. You create a feature branch, run the full workflow, ship, and return to main.

Terminal window
git switch -c feature/add-persistence
# Spec → Plan → Work → Compound
/act:git:push-make-pr
# Merge PR on GitHub
/act:git:switch-main-pull
git branch -d feature/add-persistence
Best forOne feature at a time
SetupNone — standard git
Context switchesStash or commit before switching
CLI sessionsOne

Each feature gets its own directory, branch, and Claude session. No stashing, no context switching — just open another terminal.

Terminal window
# Create worktrees/add-persistence/ — a sibling directory with its own branch
/git-worktree create add-persistence
# Open a new terminal at the worktree directory
cd worktrees/add-persistence
claude
# Spec → Plan → Work → Compound
/act:git:push-make-pr
# Merge PR on GitHub, then clean up
/git-worktree delete add-persistence
Best forParallel features or comparing approaches
SetupACT Pro (/git-worktree)
Context switchesSwitch terminals — no stashing needed
CLI sessionsOne per worktree
FactorBranchWorktree
One feature at a timeYesOverkill
Multiple features in parallelPainful (stash/switch)Yes
Comparing two models on the same featureNoYes — one worktree per model
Quick hotfix while mid-featureStash + switchCreate a second worktree
Disk space constrainedLighterEach worktree is a full checkout

When you want to evaluate two different models (e.g., Opus vs Sonnet) on the same feature:

  1. Create two worktrees from the same starting point
  2. Open a Claude session in each, configured with a different model
  3. Run the same spec and plan through /act:workflow:work in both
  4. Compare the results — code quality, test coverage, approach
  5. Keep the better result, delete the other worktree

This is the main scenario where worktrees clearly outperform branches, since you need two independent working directories at the same time.

Whichever strategy you choose, the end-to-end cycle looks the same:

  1. Isolate — create a branch or worktree
  2. Build — run the core workflow (Spec → Plan → Work)
  3. Ship/act:git:push-make-pr to create a PR
  4. Merge — review and merge on GitHub
  5. Capture/act:workflow:compound to save insights
  6. Clean up — delete the branch or worktree, return to main