Nicholas Alvarez

Git Tips

High-Quality Git Commit Messages

High-Quality Git Commit Messages – Official Guidelines
Nicholas AlvarezNicholas Alvarez
November 26, 2025

High-Quality Git Commit Messages - Official Guidelines

Subject Line (First Line)

  • Keep summary concise — 50–72 characters max
  • Capitalize the first letter
  • No period at the end
  • Use imperative mood"Add", "Fix", "Update", "Remove"
  • Optional: Use conventional prefixes → feat:, fix:, docs:, refactor:, etc.

Blank Line

Always leave one blank line between the subject and body.

Body (Detailed Explanation)

  • Wrap lines at ~72 characters for readability
  • Explain what changed and why — not how (code shows the how)
  • Use blank lines to separate paragraphs
  • Reference issues or PRs when relevant → Closes #123, Resolves #456

Perfect Example

Perfect Git commit message example

Follow these guidelines → cleaner history, better collaboration, happier teammates.