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
1
Run git status
git status is run to understand the full picture of what has changed.2
Review changes with git diff
git diff is run to review the actual changes before staging anything.3
Stage specific files
Files are staged selectively using
git add path/to/file. git add . is never used blindly.4
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.5
Commit and push
The commit is created and pushed to the remote branch.
Skills invoked
No skills are invoked./git is a direct workflow with built-in safety rules.
Commit message format
Safety rules
Common operations
Branch naming
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.