- Use imperative mood in commit messages (e.g., "Add feature" not "Added feature")
- Start with a verb: Add, Update, Fix, Remove, Refactor, etc.
- Keep the summary line under 50 characters
- Use present tense
<type>: <short summary>
<detailed description (optional)>
feat: New feature or contentfix: Bug fix or correctiondocs: Documentation changesstyle: Formatting, CSS changes (no code change)refactor: Code refactoringchore: Maintenance tasks
Good commit messages:
feat: Add atomic habits book review postfix: Correct typo in classification metrics poststyle: Update post layout spacingdocs: Update README with setup instructions
- Explain WHAT changed and WHY (not HOW)
- Use bullet points for multiple changes
- Reference issue numbers if applicable
- Keep it concise but informative