| name | git-workflows |
| description | Execute git and GitHub operations with Conventional Commits and agent-safe defaults. Use raw git/gh directly. Use gw only for worktree lifecycle (create/finish). Use when making commits, managing branches, working with PRs/issues, or performing any version control operations. |
Git & GitHub Workflows
Use raw git and gh commands directly. gw only handles issue-driven worktrees (gw git worktree create/finish).
When to Activate
- Making git commits, pushing, pulling, branching
- Creating or reviewing pull requests
- Working with GitHub issues
- Reviewing git history, diffs, or blame
- Resolving merge conflicts
- Managing worktrees for issue work
Conventional Commits Format
<type>(<optional scope>): <brief description>
<optional body>
<optional footer>
Types
| Type | Purpose | Example |
|---|
feat | New feature | feat(auth): add OAuth refresh |
fix | Bug fix | fix(landing): correct hero sizing |
docs | Documentation | docs: update API reference |
refactor | Code restructure | refactor(engine): extract validation |
test | Tests | test(billing): add webhook tests |
chore | Maintenance | chore: update dependencies |
perf | Performance | perf(queries): add index for lookups |
Scopes
Use package names: engine, landing, plant, aspen, heartwood, prism, foliage, lumen, billing
Daily Workflow
git status
git diff --stat
git add .
git commit -m "feat(engine): add GlassCard hover animation"
git push
gh pr create --title "feat(engine): add GlassCard hover animation" --body "..."
Read Operations
git status
git diff
git diff --staged
git diff main...HEAD
git log --oneline -20
git log --stat -5
git blame src/lib/file.ts
git show abc123
Write Operations
git add .
git add src/lib/specific-file.ts
git commit -m "feat: add new feature"
git push
git push -u origin feature/new-thing
git pull --rebase
git branch feature/new-thing
git switch feature/new-thing
git stash
git stash pop
git restore --staged file.ts
Worktrees (via gw)
Issue-driven worktrees are the ONE thing gw adds over raw git:
gw git worktree create 1234 --write
gw git worktree finish --write
gw git worktree finish --write -m "feat: implement dark mode"
gw git worktree finish --write --no-merge
git worktree list
GitHub Operations
gw gh issue list
gh issue create --title "..." --body "..."
gh issue close 123
gh pr create --title "feat: ..." --body "..."
gh pr list
gh pr view 123
gh pr merge 123
gh run list
gh run view 12345
Branching
git switch -c feature/user-auth
git add . && git commit -m "feat(auth): implement JWT"
git push -u origin feature/user-auth
gh pr create
feature/feature-name
fix/bug-description
refactor/what-changed
Merge Conflicts
git status
git add resolved-file.ts
git commit -m "fix: resolve merge conflicts"
git checkout --ours file.ts
git checkout --theirs file.ts
Undoing
git restore file.ts
git restore --staged file.ts
git reset --soft HEAD~1
git reset HEAD~1
git revert abc123
Best Practices
DO:
- One logical change per commit
- Descriptive subject line under 50 chars
- Use imperative mood ("Add" not "Added")
- Reference issues in footer (
Fixes #123)
- Use worktrees for parallel issue work
DON'T:
- Don't force-push to main/master
- Don't commit secrets, .env files, or API keys
- Don't combine unrelated changes in one commit
- Don't use vague messages ("fix stuff", "update")