graphite

SKILL.md

Graphite CLI

Use gt commands instead of raw git for all branch and PR operations.

Core Workflow

Create a branch with changes

gt create -m "description"           # Create branch with staged changes
gt create --all -m "description"     # Stage all files and create branch
gt create                            # Interactive: prompts for message

Modify current branch

gt modify                            # Amend staged changes to current commit
gt modify --all                      # Stage all and amend
gt modify -m "new message"           # Amend with new commit message
gt modify --commit                   # Add new commit instead of amending

Submit PR to GitHub

gt submit --no-interactive           # Push and create/update PR
gt submit --no-interactive --stack   # Submit entire stack
gt submit --no-interactive --draft   # Create as draft PR

Common Patterns

New feature:

gt create --all -m "Add user authentication"
gt submit --no-interactive

Fix after code review:

gt modify --all
gt submit --no-interactive

Multiple related changes (stacking):

gt create --all -m "Add auth middleware"
gt submit --no-interactive
gt create --all -m "Add login endpoint"
gt submit --no-interactive --stack

Key Flags

Flag Commands Effect
--all, -a create, modify Stage all changes including untracked
--message, -m create, modify Set commit message
--no-interactive submit Skip prompts, use defaults
--stack, -s submit Include descendant branches
--draft, -d submit Create PR as draft

Navigation

gt checkout [branch]    # Switch branch (interactive if no arg)
gt up / gt down         # Move up/down the stack
gt log                  # Show stack structure
gt sync                 # Sync with remote, clean merged branches

Conflict Resolution

gt continue             # Continue after resolving conflicts
gt abort                # Abort current operation
gt restack              # Rebase stack to fix parent history

Resources

See references/commands.md for full command reference.

Weekly Installs
1
First Seen
4 days ago
Installed on
replit1
amp1
cline1
opencode1
cursor1
kimi-cli1