Skip to content

Commit Messages

Kevin Hoffman edited this page Feb 7, 2018 · 14 revisions

Format

{type}({scope}): {subject line}
{blank line}
The motivation for this change was...
{blank line}
The issue was resolved by...
{footer}

Each commit message should follow the format above with blank lines clearly separating subject line and body.

Examples

  • build(webpack): set `sourcemap: true` in UglifyJS plugin
  • doc(donors-query): add missing `@since` tags throughout class
  • feat(reports): migrate methods from `[give_totals]` shortcode
  • style(payments-query): correct indentation
  • fix(donation): ensure PHP 5.3 compatibility in array syntax

DO

  1. Begin each commit message with a {type}({scope}): prefix.
  2. Use the imperative mood.
  3. Separate subject line from body with a blank line.
  4. Use the the optional message body to explain the motivation for the change and how you resolved it.
  5. Optionally add a footer if the issue is meant to close an issue (e.g. Closes #123) or use it to document breaking changes.
  6. Wrap any code, such as Class_Name, method(), $property, $variable, or @tag, in backticks.

DO NOT

  1. Do not end subject lines with a period.
  2. Do not exceed 72 characters in subject lines or body text.

Clone this wiki locally