Commit message guidelines

exile.watch

About

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-config.

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 PATCH in Semantic Versioning).

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

  3. BREAKING CHANGE: a commit that appends a ! after the type/scope, introduces a breaking API change (correlating with MAJOR 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/examples

Commit message with scope

Commit message with no scope

Commit message with ! to draw attention to breaking change

References

Last updated

Was this helpful?