Skip to main content

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 /review or /implement’s built-in review gate)
  • On a feature branch (not main or master)

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

type(scope): short description

Optional longer explanation of WHY, not what.
TypeUse for
featNew feature
fixBug fix
refactorCode change without behavior change
testTest additions or changes
docsDocumentation only
choreMaintenance tasks

Safety rules

These operations are never performed, regardless of what you ask:
  • Force push to main or master
  • Commit secrets, .env files, or credentials
  • Skip pre-commit hooks with --no-verify
  • Amend published commits
  • Use --force without investigation

Common operations

git status                    # What changed
git diff                      # Review changes
git add path/to/file          # Stage specific files
git commit -m "feat: add X"   # Commit with message
git log --oneline -10         # Recent history
git stash                     # Save work temporarily

Branch naming

TypePattern
Featuresfeat/description
Fixesfix/description
Experimentsexperiment/description

Example

/git
Antigravity runs git status, reviews the diff, stages src/notifications/service.ts and src/notifications/service.test.ts specifically, and generates:
feat(notifications): add email and push notification delivery

Previously all notifications were stored but never delivered.
Adds NotificationService with email (SendGrid) and push (FCM) channels.

/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.

Build docs developers (and LLMs) love