Skip to main content

💬 Commit Messages

Conventional Commits

Use Conventional Commits as a guide for writing commit messages.

Why Conventional Commits?

The main goal of using conventional commits is to have a clear, concise and self explanatory commit message that can be used to generate a changelog. This is useful for tracking changes in a project and also for generating release notes.

The Common commit types we use:

  • feat: A new feature, or a change to an existing feature. This corresponds to a MINOR in semantic versioning.
git commit -m "feat: add new feature"
  • fix: A bug fix. This corresponds to a PATCH in semantic versioning.
git commit -m "fix(auth): fix bug"
  • BREAKING CHANGE: A commit that has the text BREAKING CHANGE: at the beginning of its optional body or footer section or appends a "!" after the type/scope introduces a breaking API change. A BREAKING CHANGE can be part of commits of any type.
git commit -m "feat: add new feature
BREAKING CHANGE: removed support for Node 6"

OR

git commit -m "feat!: add new feature
removed support for Node 6"
  • docs: Documentation only changes.
git commit -m "docs: update readme"
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc).
git commit -m "style: fix linting issues"
  • refactor: A code change that neither fixes a bug nor adds a feature.
git commit -m "refactor: refactor code"
  • chore: Changes to the build process or auxiliary tools and libraries such as documentation generation.
git commit -m "chore: update dependencies"
  • test: Adding missing tests or correcting existing tests.
git commit -m "test: add unit tests"