Skip to main content
Ganesh Joshi
Back to AI Rules

One concern per commit

Updated 2026-02-14

When suggesting git commits, group changes into one logical concern per commit; keep messages clear and scoped. Use in any AI-assisted editor.

Use in Cursor, Windsurf, Codeium, or any AI-assisted editor.

Rule
# One concern per commit

When suggesting or describing git commits, group changes into one logical concern per commit. Keep messages clear and scoped.

- **One concern:** Each commit should do one thing: fix one bug, add one feature, refactor one area, or update one dependency. Avoid mixing unrelated edits.
- **Message:** Write a short, imperative subject line (e.g. "Add validation for email field"); add a body only if you need to explain why or document breaking changes.
- **Do not:** Suggest a single large commit that mixes formatting, new features, and renames. Split into logical commits when the change set is large or diverse.
One concern per commit | AI Rules | Ganesh Joshi