Skip to content

A comprehensive guide to Conventional Commits for developers โ€” ensuring clean, consistent, and automated commit practices across all projects.

Notifications You must be signed in to change notification settings

unifiedbits/commit-guidelines

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

UnifiedBits Commit Message Guidelines

Welcome to the official commit convention guide for UnifiedBits!
We follow the Conventional Commits specification to ensure clarity, traceability, and automation in our development process.


๐Ÿ“Œ Why Use Conventional Commits?

  • ๐Ÿง  Clear project history
  • ๐Ÿš€ Easy changelog generation
  • ๐Ÿค– Enables automation (versioning, deployments)
  • ๐Ÿค Improves team collaboration and onboarding

๐Ÿ› ๏ธ Commit Message Format

A commit message must be structured as follows:

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

[optional body]

[optional footer]

โœ… Example

feat(auth): add login with OTP support

This introduces OTP-based authentication using Twilio.
Also updates the user model to include phone verification.

Fixes #24

๐Ÿ”ค Allowed Commit Types

Type Description
feat A new feature
fix A bug fix
docs Documentation only changes
style Code style changes (formatting, missing semicolons, etc.)
refactor Code change that neither fixes a bug nor adds a feature
perf Performance improvements
test Adding or updating tests
chore Maintenance tasks (configs, deps, CI/CD)

๐Ÿงฉ Optional Scopes

Use scopes to specify which part of the codebase is affected.
Example: feat(api), fix(ui), docs(readme)

Scope Examples
auth
ui
api
core
docs
deps

๐Ÿ“‹ Writing Good Commit Messages

  • โœ… Use the imperative mood: "fix bug" not "fixed bug"
  • โœ… Keep subject line under 72 characters
  • โœ… Use body to explain why, not just what
  • โœ… Separate the subject, body, and footer with blank lines
  • โœ… Reference issues or PRs in the footer (e.g., Fixes #12)

๐Ÿ”„ Sample Commit Examples

Here are realistic examples categorized by type:

๐ŸŽฏ feat: New Feature

feat(auth): add login with OTP support
feat(dashboard): implement user analytics charts
feat(api): add endpoint for bulk file processing

๐Ÿ› fix: Bug Fix

fix(ui): resolve button misalignment on mobile view
fix(api): correct 500 error on invalid input
fix(auth): prevent token from expiring prematurely

๐Ÿ“„ docs: Documentation Changes

docs(readme): update installation instructions
docs(api): add usage examples to user routes
docs(contributing): explain branching strategy

๐ŸŽจ style: Formatting & Styling

style(ui): unify font sizes across components
style(css): apply consistent padding and margins
style(auth): fix lint warnings and spacing issues

โ™ป๏ธ refactor: Code Refactoring

refactor(core): extract utility functions from controller
refactor(api): simplify query logic in search route
refactor(auth): remove unused middleware

๐Ÿš€ perf: Performance Improvements

perf(api): optimize DB query for loading dashboard
perf(ui): lazy load images for faster initial load

โœ… test: Adding/Updating Tests

test(api): add test cases for file upload
test(auth): increase test coverage for login flow
test(ui): snapshot tests for new components

๐Ÿ”ง chore: Maintenance/Meta

chore(ci): add GitHub Actions workflow for testing
chore(deps): upgrade dependencies to latest versions
chore(project): rename folders for clarity

๐Ÿงช Tools to Help

  • ๐Ÿ›ก๏ธ Commitlint โ€“ Lint commit messages
  • ๐Ÿค– Commitizen โ€“ Generate commits via CLI prompts
  • ๐Ÿ“ฆ Semantic Release โ€“ Automate changelog and versioning

๐Ÿ“š Resources


๐Ÿ”ฎ Final Note

Following a convention for commit messages ensures every contributor understands the codebase history clearly, automates release processes, and scales the team with confidence.

โ€œQuality is never an accident; it is always the result of intelligent effort.โ€ โ€“ John Ruskin

Happy committing! ๐Ÿš€
โ€” Team UnifiedBits

About

A comprehensive guide to Conventional Commits for developers โ€” ensuring clean, consistent, and automated commit practices across all projects.

Topics

Resources

Stars

Watchers

Forks