--- name: commit description: "Prepare or create commits using Sentry-style message conventions when the repository requests them; inspect staged scope and honor its protected branch workflow." risk: critical source: community date_added: "2026-09-04" --- # Sentry Commit Messages Follow these conventions when creating commits for Sentry projects. ## When to Use - The user asks to commit code, prepare a commit message, or save changes in git. - You need Sentry-style commit formatting with conventional commit structure and issue references. - The task requires enforcing branch safety before committing, especially avoiding direct commits on `main` or `master`. ## Prerequisites Before committing, always check the current branch: ```bash git branch --show-current ``` Read repository policy before creating a commit. If the default branch is PR-only, create an authorized topic branch and use the repository's native maintainer flow, even when an administrator could bypass server checks. AAS requires `antigravity-maintainer-batch-release` and protected source PRs. Inspect `git status --short`, `git diff --cached`, and the intended changed paths; preserve unrelated staged/dirty work. Use an installed `create-branch` helper only if available and appropriate, otherwise create the topic branch through the repository workflow. Verify the actual branch before proceeding. A request for a message alone does not authorize staging, committing or pushing. ## Format ``` ():