Commit Conventions

Write disciplined git commits. Use whenever committing changes or writing commit messages — conventional-commit subjects, and never commit directly to main.

Sentry f2cb91b 4 files · 4.7 KB Updated 845 repo stars

File contents

Commit Conventions

When committing changes, follow these rules without being asked:

Subject format

Write every commit subject as <type>(<scope>): <description>:

  • Types: feat, fix, docs, test, ref (refactor), chore. Scope is optional.
  • Imperative, present tense: "Add null check", not "Added" or "Adds".
  • At most 70 characters. No trailing period.
  • Describe the actual change, not the activity ("fix(api): Handle null user response", never "update code").

Example: after fixing a missing null check in app.js:

fix(app): Handle null result in user lookup

Branch safety

Before committing, check the current branch (git branch --show-current):

  • On main or master: create a feature branch first — git checkout -b <type>/<short-description> — then commit there. Never commit directly to main, even for small changes.
  • Already on a feature branch: commit there.

Never

  • Never amend, rebase, or force-push existing history unless the user explicitly asks.
  • Never bundle unrelated changes into one commit — mention anything you left unstaged.

getsentry/skillet/tree/main/examples/commit-conventions commit f2cb91b357

Frequently asked questions

npx skillmds@latest add getsentry/commit-conventions