Skip to content

Commit Messages

Kevin Hoffman edited this page Oct 1, 2018 · 14 revisions

Format

<type>: <subject line>

The motivation for this change is...

The issue is resolved by...

<footer>

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

Examples

  • chore: enable sourcemaps in UglifyJS
  • doc: add missing @since tags
  • feat: migrate methods from [give_totals] shortcode
  • format: correct indentation
  • fix: ensure PHP 5.3 compatibility in array syntax

DO

  1. Begin each commit message with a prefix.
  2. Use the imperative mood.
  3. Separate subject line from body with a blank line.
  4. Add an optional message body to explain the motivation for the change and how you resolved it.
  5. Add an optional 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