Skip to content

Instantly share code, notes, and snippets.

@ericjuta
Created January 2, 2026 16:12
Show Gist options
  • Select an option

  • Save ericjuta/5e7a3698f6f1017f4b46a5e33a169237 to your computer and use it in GitHub Desktop.

Select an option

Save ericjuta/5e7a3698f6f1017f4b46a5e33a169237 to your computer and use it in GitHub Desktop.
git spice ai doc

Git Workflow (git-spice)

  • NEVER use git commit - use gs commit create -m "message" instead

  • NEVER use git push - use gs stack submit instead

  • Before implementing multi-step features, present the stack structure for approval

  • Use conventional commits: type(scope): description

  • After submitting, provide the PR link from the output

Setup (if user does not have git-spice installed, assume they do!)

./scripts/install_workflow.sh

Key Commands (with shorthands)

| Command | Shorthand | Purpose |

|---------|-----------|---------|

| gs branch create | gs bc | Create new branch stacked on current |

| gs commit create | gs cc | Stage and commit changes |

| gs stack submit | gs ss | Submit entire stack as PRs |

| gs repo sync | gs rs | Pull latest, delete merged branches |

| gs stack restack | gs sr | Rebase all branches in stack |

| gs log long --all | gs ll -a | Show dependency tree |

| gs branch checkout | gs bco | Switch branches |

| gs up / gs down | - | Navigate stack |

| gs w <branch> | gs w <branch> | Add worktree |

| gs w clean <branch> | gs w clean <branch> | Clean up worktree |

Stacking Workflow

  1. Write code for first PR

  2. gs commit create -m "feat(scope): description" (auto-stages with -a)

  3. gs branch create feat-name to start next stacked branch

  4. Repeat steps 1-3 for each stacked PR

  5. gs stack submit to push entire stack and create PRs

Sync & Maintenance

gs repo sync     # Pull trunk, delete merged branches

gs stack restack # Rebase stack after trunk changes

gs ll -a         # View full stack tree
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment