Skip to main content

Git Commit Message Standard

This document describes the standard format for writing clean, consistent, professional Git commit messages using Conventional Commits.


📌 Commit Message Format

<type>(optional-scope): <short summary>

(optional body)

(optional footer)

🎯 Commit Types

TypePurpose
featNew feature
fixBug fix
docsDocumentation updates
styleNon-code changes (formatting, spacing)
refactorCode improvement without changing behavior
perfPerformance improvement
testAdding or updating tests
buildBuild system or dependencies
ciContinuous Integration updates
choreMaintenance tasks

✨ Examples

1. Adding a new document

docs: add project requirements document

2. Fixing a bug

fix(auth): resolve token expiration issue

3. Adding a new feature

feat(blog): add post search functionality

4. Refactoring code

refactor(api): simplify user serializer logic

5. Updating documentation

docs(readme): update setup instructions

📝 Best Practices

  • Use lowercase for the commit type
  • Write in present tense (e.g., "add" not "added")
  • Keep the summary short (≤ 50 characters)
  • Use the body to explain why the change was made
  • Use footer for issue references, e.g.:
Closes #42

feat(auth): implement refresh token flow

Added refresh token rotation and secure cookie handling.

Closes #42