Overview

Conventional Commits provide a lightweight set of rules for creating an explicit commit history. This makes it easier for humans to read and for tools to automate tasks like versioning and changelog generation.

Structure

<type>[optional scope]: <description>

Common types include:

  • feat: A new feature.
  • fix: A bug fix.
  • docs: Documentation changes.
  • style: Changes that do not affect the meaning of the code (white-space, formatting).
  • refactor: A code change that neither fixes a bug nor adds a feature.
  • chore: Updating build tasks, package manager configs, etc.

Benefits

  • Automated SemVer: Tools can determine the next version number based on the commit types.
  • Better Collaboration: Clearer communication of what each change does.

Related Terms