Commit message guidelines

exile.watch
triangle-exclamation

About

circle-info

We have very precise rules over how our git commit messages can be formatted.

We use the git commit messages to generate @exile-watch/{project} change logs via @exile-watch/conventional-changelog-configarrow-up-right.

This also leads to more readable messages that are easy to follow when looking through the project history.

The commit contains the following structural elements, to communicate intent to the consumers of our libraries:

  1. fix: a commit of the type fix patches a bug in your codebase (this correlates with PATCHarrow-up-right in Semantic Versioning).

  2. feat: a commit of the type feat introduces a new feature to the codebase (this correlates with MINORarrow-up-right in Semantic Versioning).

  3. BREAKING CHANGE: a commit that appends a ! after the type/scope, introduces a breaking API change (correlating with MAJORarrow-up-right in Semantic Versioning). A BREAKING CHANGE can be part of commits of any type.

  4. other types that are supported:

    • build:

    • chore:

    • ci:

    • docs:

    • style:

    • refactor:

    • perf:

    • test:

Examples

tl;dr: https://www.conventionalcommits.org/examplesarrow-up-right

Commit message with scope

Commit message with no scope

Commit message with ! to draw attention to breaking change

References

Last updated