Subject Line Too Long

Why the 72-character subject line limit matters for Conventional Commits. Learn how to write concise subject lines and move details to the body.

Best Practices

Detailed Explanation

The 72-Character Subject Line Limit

The widely accepted convention is to keep Git commit subject lines at or under 72 characters. This is not a hard technical limit — Git allows much longer subjects — but it is a practical guideline rooted in how commit messages are displayed.

Why 72 Characters?

  • git log --oneline: Truncates at the terminal width. Long subjects get cut off.
  • GitHub/GitLab: Truncates commit messages in the commit list view, typically at 72 characters.
  • Email patches: git format-patch generates emails, and email clients wrap at 72-78 characters.
  • Terminal width: The traditional terminal is 80 columns; 72 characters leaves room for Git's indentation.

Example: Too Long

feat(authentication): implement OAuth2 authorization code flow with PKCE for single-page applications and mobile clients

At 115 characters, this subject is too long. In git log --oneline, it would appear as:

a1b2c3d feat(authentication): implement OAuth2 authorization code flow with PKCE for single-...

Fixed Version

feat(auth): add OAuth2 PKCE authorization flow

Implement the OAuth2 authorization code flow with PKCE for
single-page applications and mobile clients. This replaces
the implicit grant flow, which is no longer recommended.

Strategies for Shortening

  1. Shorten the scope: authentication to auth, notifications to notify.
  2. Remove filler words: "implement the new" to "add".
  3. Move details to the body: The subject says what; the body says how.
  4. Use abbreviations judiciously: config instead of configuration.
  5. Focus on the outcome: What does the user or developer get? Not how was it built.

Configurable Limits

The Conventional Commits Linter defaults to 72 characters but allows you to adjust the limit from 50 to 120 characters using the slider in the Options panel. Some projects use 50 characters (the Git recommendation for non-conventional commits) while others allow up to 100.

Warning vs Error

The linter issues a warning for subjects up to 10 characters over the limit and an error for subjects exceeding the limit by more than 10 characters.

Use Case

Enforce subject line length limits to ensure commit messages are readable in all common Git tools: terminal output, GitHub/GitLab commit lists, email patches, and code review interfaces. This is especially important for open-source projects where contributors use diverse tools.

Try It — Conventional Commits Linter

Open full tool