This project follows the Conventional Commits specification for commit messages.
type: description
- feat: A new feature
- fix: A bug fix
- docs: Documentation only changes
- style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
- refactor: A code change that neither fixes a bug nor adds a feature
- perf: A code change that improves performance
- test: Adding missing tests or correcting existing tests
- chore: Changes to the build process or auxiliary tools and libraries such as documentation generation
- ci: Changes to CI configuration files and scripts
- build: Changes that affect the build system or external dependencies
- revert: Reverts a previous commit
git commit -m "feat: add user authentication system"
git commit -m "fix: resolve login button not working"
git commit -m "docs: update README with setup instructions"
git commit -m "style: format code with prettier"
git commit -m "refactor: simplify user validation logic"
git commit -m "perf: optimize database queries"
git commit -m "test: add unit tests for user service"
git commit -m "chore: update dependencies"
git commit -m "ci: add GitHub Actions workflow"
git commit -m "build: update webpack configuration"
git commit -m "revert: revert to previous stable version"git commit -m "test" # Missing description
git commit -m "added new feature" # Missing type
git commit -m "FIX: bug fix" # Wrong case
git commit -m "feat:Add new feature" # Missing space after colon
git commit -m "feat: add new feature." # Ends with period- Type is required: Every commit must start with a type
- Type must be lowercase: Use
featnotFEAT - Description is required: Provide a clear, concise description
- No period at the end: Don't end the description with a period
- Use imperative mood: Write as if you're giving a command
- Keep it under 72 characters: For the header line
For breaking changes, add ! after the type and BREAKING CHANGE: in the body:
git commit -m "feat!: remove deprecated API"Or with a body:
git commit -m "feat: add new API
BREAKING CHANGE: The old API has been removed and replaced with the new one."You can add a scope to provide more context:
git commit -m "feat(auth): add OAuth2 support"
git commit -m "fix(ui): resolve button alignment issue"
git commit -m "docs(api): update endpoint documentation"For more detailed commits, you can add a body and footer:
git commit -m "feat: add user authentication
This commit adds a complete authentication system with JWT tokens,
password hashing, and session management.
Closes #123
Fixes #456"# Quick feature commit
git commit -m "feat: add new feature"
# Quick bug fix
git commit -m "fix: resolve issue"
# Quick documentation update
git commit -m "docs: update documentation"
# Quick style fix
git commit -m "style: format code"If you're unsure about the commit message format, you can:
- Check this guide
- Use the examples above
- Ask your team members
- Use
git commitwithout-mto open an editor for a more detailed message