General
How to Write Commit Messages That Aren't Rejected (2026 Guide)
Table of contents
The Conventional Commits StandardThe Imperative Mood RuleCommon Mistakes (and How to Fix Them)How Code-Aware Grammar Checking HelpsThe 30-Second Pre-Push RitualRelatedCommit messages are read by humans — reviewers, future you, collaborators on the other side of the world. A sloppy commit message says: *I don't care about this code.*
Here's how to write them right.
Types: feat, fix, chore, docs, refactor, style, test, build, ci, perf
Examples:
-
-
-
-
Commit subjects should read like commands, not descriptions:
❌ *"Added retry logic for timeout errors"*
✅ *"Add retry logic for timeout errors"*
Think: what does this commit do? Not what did it do.
| Mistake | Wrong | Right |
|---|---|---|
| Wrong tense | "Added feature" | "Add feature" |
| Missing scope | "fix: handle timeout" | "fix(api): handle timeout" |
| Too vague | "update code" | "refactor(auth): simplify token refresh" |
| Breaking convention | "wip" | "WIP: draft auth module" |
| Ignoring format |
Paste your commit message draft into [Lint's grammar checker](https://tools.aicreditsapi.com/tools/grammar-check). It will:
- ✅ Catch typos and grammar errors
- ✅ Leave
- ✅ Suggest imperative mood improvements
- ✅ Check tone — keep it professional, not casual
Draft your commit message Paste into Lint (or your preferred code-aware checker) Review changes — fix only real errors Push
That's it. One minute per commit. Better history, fewer rejections, cleaner PRs.
- [AI Proofreading for Commit Messages](/tools/blog/ai-proofreading-for-commit-messages-and-pr-descriptions-2026)
- [Writing Better PR Descriptions](/tools/blog/writing-better-pr-descriptions-with-ai-2026)
- [Free Developer Writing Handbook](https://tools.aicreditsapi.com/tools/ebook)
Here's how to write them right.
The Conventional Commits Standard
<type>(<scope>): <subject>
<body>
<footer>Types: feat, fix, chore, docs, refactor, style, test, build, ci, perf
Examples:
-
feat(auth): add OAuth2 refresh token handling-
fix(api): resolve null pointer in retry loop-
docs(readme): update setup instructions for Docker-
refactor(utils): extract retry logic into dedicated moduleThe Imperative Mood Rule
Commit subjects should read like commands, not descriptions:
❌ *"Added retry logic for timeout errors"*
✅ *"Add retry logic for timeout errors"*
Think: what does this commit do? Not what did it do.
Common Mistakes (and How to Fix Them)
| Mistake | Wrong | Right |
|---|---|---|
| Wrong tense | "Added feature" | "Add feature" |
| Missing scope | "fix: handle timeout" | "fix(api): handle timeout" |
| Too vague | "update code" | "refactor(auth): simplify token refresh" |
| Breaking convention | "wip" | "WIP: draft auth module" |
| Ignoring format |
fix: at start | fix(auth): ... |How Code-Aware Grammar Checking Helps
Paste your commit message draft into [Lint's grammar checker](https://tools.aicreditsapi.com/tools/grammar-check). It will:
- ✅ Catch typos and grammar errors
- ✅ Leave
feat(auth): and file paths untouched- ✅ Suggest imperative mood improvements
- ✅ Check tone — keep it professional, not casual
The 30-Second Pre-Push Ritual
That's it. One minute per commit. Better history, fewer rejections, cleaner PRs.
Related
- [AI Proofreading for Commit Messages](/tools/blog/ai-proofreading-for-commit-messages-and-pr-descriptions-2026)
- [Writing Better PR Descriptions](/tools/blog/writing-better-pr-descriptions-with-ai-2026)
- [Free Developer Writing Handbook](https://tools.aicreditsapi.com/tools/ebook)
📌 Prices and tool count in this article may be outdated. Lint now ships 16 tools with Pro at $12/mo, or $60/year. See the current pricing page.
Stop letting Grammarly break your code
16 AI tools built for developers. Code-aware parsing.
Or upgrade to Pro for 500 checks a day · All tools · No ads