What it does
/git handles git operations with a smart commit protocol that reviews actual changes, stages files selectively, and generates Conventional Commits-formatted messages. It enforces safety rules that prevent destructive operations.
This is Step 5 in the core workflow — used after /review to commit and push completed work.
When to use
Use/git when you’re ready to commit and push completed, reviewed work. Also useful for any git operation where you want intelligent staging and commit message generation.
Prerequisites
- Tests passing
- Code reviewed (via
/reviewor/implement’s built-in review gate) - On a feature branch (not
mainormaster)
Conversation mode
Either mode works. Fast Mode is fine for mechanical commit operations.What happens
Stage specific files
Files are staged selectively using
git add path/to/file. git add . is never used blindly.Generate commit message
A commit message is generated following Conventional Commits format:
type(scope): short description with an optional longer explanation of why — not what.Skills invoked
No skills are invoked./git is a direct workflow with built-in safety rules.
Commit message format
| Type | Use for |
|---|---|
feat | New feature |
fix | Bug fix |
refactor | Code change without behavior change |
test | Test additions or changes |
docs | Documentation only |
chore | Maintenance tasks |
Safety rules
Common operations
Branch naming
| Type | Pattern |
|---|---|
| Features | feat/description |
| Fixes | fix/description |
| Experiments | experiment/description |
Example
git status, reviews the diff, stages src/notifications/service.ts and src/notifications/service.test.ts specifically, and generates:
Related commands
/review
Step 4 — validate implementation before committing.
/implement
/implement commits after every GREEN test using the same Conventional Commits format.
/build
Run /build before /git to ensure the production build is clean.
/test
Verify all tests pass before committing.