byandrev's blog
  • #git

Why use Conventional Commits?

3 min read

What Are Conventional Commits?

Conventional Commits is a specification that defines how commit messages should be written in Git. Its goal is to create a clearer and more structured commit history.

Each commit follows a predictable pattern that describes the intention behind the change — whether it fixes a bug (fix), adds a new feature (feat), or introduces a breaking change (breaking change).

Structure of a Conventional Commit

A commit is structured as follows:

<type>[optional scope]: <description>
 
[optional body]
 
[optional footer(s)]
  1. Type (<type>): communicates the purpose of the change (for example, feat, fix, or docs).
  2. Scope (optional): indicates which part of the code was modified, such as feat(api) or fix(auth).
  3. Description: a short, concise summary of the change.
  4. Body (optional): provides additional context or technical details.
  5. Footer(s): used for breaking changes, issue references, or approvals.

Most Common Types

TipoPropósito
fixFixes a bug
featAdds a new feature
docsDocumentation-only changes
refactorImproves code without changing its behavior
buildChanges to dependencies or build configuration
choreRoutine tasks with no functional impact

Practical Examples

New feature with scope:

feat(auth): add Google login support

Bug fix with details:

fix: handle async error management properly

Added a unique identifier to avoid race conditions.
Refs #133

Conclusion

Adopting Conventional Commits isn’t just about writing prettier messages, it’s about improving communication, reducing errors, and automating key parts of your development workflow.

At first, it might feel like an extra rule to remember, but soon you’ll notice your commits becoming more expressive and your workflow more organized.

Next time you write a commit message, ask yourself:

“What kind of change am I making?”

Use feat:, fix:, or docs: and let your commits speak for themselves.