The Conventional Commits specification gives us a framework for how we should write Git commit messages.

  • feat: a new feature addition (minor in semantic versioning).
  • fix: bug fix (patch in semantic versioning).
  • chore: changes that aren’t a fix or feature, and don’t modify source or test files.
  • refactor: can also include linter fixes. For changes that don’t modify functionality but do modify source/test files.
  • docs: updates to documentation (including READMEs).
  • style: code formatting. Usually this isn’t too frequent if changes are required to be formatted before a commit.
    • Could also include linter fixes!
  • test: new or correcting previous tests.
  • ci: related to continuous integration.
  • perf: performance contributions.
  • build: changes that affect the build system or external dependencies.
  • revert: of a previous commit.

In the footer:

  • BREAKING CHANGE: major in semantic versioning. They can be part of commits of any type.
  • We can also specifically reference other things, like previous commit hashes or ticket numbers.