git section of your PREFERENCES.md file.
Git Preferences
Add or edit thegit block in ~/.gsd/PREFERENCES.md (global) or .gsd/PREFERENCES.md (project-level):
Setting Reference
git.isolation — Control where work happens
git.isolation — Control where work happens
The most consequential git setting. Choose how GSD isolates each milestone’s work:
See the Worktrees guide for full details on each mode.
| Value | Behavior |
|---|---|
none (default) | Work happens directly on your current branch. No worktree or milestone branch created. Ideal for hot-reload workflows and small projects. |
worktree | Each milestone gets a separate directory at .gsd/worktrees/<MID>/ on a milestone/<MID> branch. Full file isolation. Squash-merged to main on completion. |
branch | Work stays in the project root on a milestone/<MID> branch. No separate directory. Best for submodule-heavy repos where worktrees cause problems. |
git.merge_strategy — How milestone branches merge
git.merge_strategy — How milestone branches merge
Controls whether GSD squashes all milestone commits into one clean commit on main, or preserves the individual commit history:
| Value | Behavior |
|---|---|
squash (default) | All commits are squashed into one clean commit on main. Gives a linear history with one meaningful commit per milestone. |
merge | Individual commits from the milestone branch are preserved. Use when you want a detailed commit history per task. |
git.snapshots — WIP commits during long tasks
git.snapshots — WIP commits during long tasks
When enabled, GSD creates snapshot commits during long-running tasks so work-in-progress is preserved even if the session is interrupted.Snapshot commits use a
wip: prefix and are squashed away when the milestone completes.git.commit_docs — Version-control planning artifacts
git.commit_docs — Version-control planning artifacts
Controls whether GSD commits Set to
.gsd/ planning files (milestones, roadmaps, decisions, etc.) to git alongside code.false to keep all planning artifacts local-only. GSD will add .gsd/ to .gitignore automatically. Useful for teams where only some members use GSD, or when company policy requires a clean repository.git.manage_gitignore — Auto-update .gitignore
git.manage_gitignore — Auto-update .gitignore
When enabled (the default), GSD automatically updates
.gitignore with its baseline patterns and removes stale entries during self-healing.Automatic Pull Requests
GSD can create a pull request automatically when a milestone completes. This is designed for teams using branch-based workflows where code goes through PR review before merging.Automatic PR creation requires the
gh CLI to be installed and authenticated (gh auth login). PR creation failure is non-fatal — GSD logs a warning and continues.Manual PR Creation
Create a PR from inside a GSD session at any time with/gsd ship:
/gsd closeout to finalize a milestone and run any remaining git closeout actions:
GitHub Integration
GSD can sync milestones, slices, and tasks to GitHub Issues, Milestones, and Projects automatically. Enable and configure it inPREFERENCES.md:
| Field | Description |
|---|---|
enabled | Enable or disable GitHub sync |
repo | GitHub repository in owner/repo format. Auto-detected from your git remote if not set. |
labels | Labels to apply to all GSD-created issues and PRs |
project | GitHub Project ID for project board integration |
GitHub integration requires the
gh CLI installed and authenticated. Sync mapping is persisted in .gsd/.github-sync.json. GSD is rate-limit aware and skips sync automatically when the GitHub API limit is low.GitHub Sync Commands
Workflow Modes
Instead of configuring every git setting individually, set amode to apply sensible defaults for your workflow:
| Setting | solo | team |
|---|---|---|
git.auto_push | true | false |
git.push_branches | false | true |
git.pre_merge_check | false | true |
git.merge_strategy | squash | squash |
git.isolation | none | none |
git.commit_docs | true | true |
unique_milestone_ids | false | true |
/gsd mode.
Commit Format
GSD writes commits using the conventional commit format with task metadata in trailers:git.commit_type:
Self-Healing Git Issues
GSD automatically recovers from common Git problems:Stale lock files
Removes
.git/index.lock only after it’s older than 5 minutes, so active git operations on large repos aren’t interrupted.Interrupted operations
Aborts leftover rebase, cherry-pick, or revert state from a killed worker before reconciling merge state.
Orphaned worktrees
Detects and offers to clean up abandoned worktrees from crashed sessions.
Unsafe branch resets
Refuses to force-reset a milestone branch if doing so would orphan commits unreachable from the start point.
/gsd doctor to check Git health manually and surface any issues that need attention.