Skip to content

Commit Message Format

Ryan Johnson edited this page Oct 16, 2019 · 3 revisions

The following rules are based on Conventional Commits.

Single-Line Message

<type>[(<scope>)][!]: <summary>
  1. <type>
    • type of commit (see below)
  2. (<scope>) (optional)
    • scope of changes, wrapped in parentheses
    • Do not leave parentheses empty!
  3. exclamation point ("!") (optional)
    • indicates a breaking change (semver MAJOR)
  4. colon (":")
  5. single space (" ")
  6. <summary>
    • description of changes

Multi-line Message

Expands on Single-Line message rules with the addition of an optional <body> and <footers>.

<type>[(<scope>)][!]: <summary>

[<body>]

[<footers>]
  • If the commit includes breaking changes, add the "!" to the header in addition to providing a BREAKING CHANGE footer to add more details about the breaking changes.

Commit Types

  • build
    • update/modify build system and/or dependencies
  • chore
    • any change that does not fit into any other type
  • docs
    • changes to documentation content
  • feat (semver MINOR)
    • add new functionality
  • fix (semver PATCH)
    • patch bug/error
  • perf
    • code changes that improve performance of consumed assets
  • publish
    • Do not use!
    • Reserved for build processes.
  • refactor
    • code changes that neither fix a bug nor add a feature
  • saas
    • changes to SAAS (Software as a Service) configurations
  • style
    • code changes that do not modify algorithms
    • e.g., white space changes, linting corrections, etc.
  • test
    • add missing tests or update existing tests

Commit Summary

  • Use imperative, present tense
    • e.g., "change" instead of "changed" or "changes"
  • do not capitalize first letter
  • do not end with period

Commit Body

  • Same as the subject, use imperative, present tense.
  • Include motivation for the change and contrasts with previous functionality.

Commit Footers

The footer is optional. Use the footer to record any of the following:

Deprecations

chore: deprecate hx-thingamabob

DEPRECATED: `<hx-thingamabob>`, use `<hx-thingamajig>` instead

Breaking Changes

chore!: remove hx-thingamabob

BREAKING CHANGE: Remove deprecated `<hx-thingamabob>`

Issue References

fix: issue 5678

Fixes #5678
feat: add requested feature

Closes #1234

User Story References

build: update dependencies

Closes JIRA-910
  • Do not include full URL to user story. The identifier is what matters.
Clone this wiki locally