General

How to Write Commit Messages That Aren't Rejected (2026 Guide)

2026-10-16 · 8 min · Lint Team

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

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 module

The 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



  • 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)
    📌 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.
    Try Lint free — no signup, code-aware
    Free · no account needed · open full toolkit →
    L
    Lint Team
    Lint Tools — AI writing for developers

    Stop letting Grammarly break your code

    16 AI tools built for developers. Code-aware parsing.

    Try free — no signup View pricing
    Or upgrade to Pro for 500 checks a day · All tools · No ads

    Need more than free tools?

    Unlock 500 checks a day, larger text capacity, and priority support.

    View pricing → Upgrade Lint — Pro $12/mo or $60/yr
    💬