Skip to content

Instantly share code, notes, and snippets.

@OblateSpheroid
Forked from joshbuchea/semantic-commit-messages.md
Last active September 30, 2021 09:43
Show Gist options
  • Save OblateSpheroid/d2bb2971052e0068e0367d388071e661 to your computer and use it in GitHub Desktop.
Save OblateSpheroid/d2bb2971052e0068e0367d388071e661 to your computer and use it in GitHub Desktop.
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format:

<type>(<scope>): <subject>

<body>

<footer>

<scope> is optional

Header (first line)

feat(app): add hat wobble
^--^       ^------------^
|          |
|          +-> Summary in present tense.
|
+-------> Type: chore, docs, feat, fix, refactor, style, or test.

<type> values:

  • feat ๐Ÿฅ: new feature for the user, not a new feature for build script
  • fix ๐Ÿ› ๏ธ: bug fix for the user, not a fix to a build script
  • docs ๐Ÿ“: changes to the documentation
  • style โœ‚๏ธ: formatting, missing semi colons, etc; no production code change
  • refactor โš™๏ธ: refactoring production code, eg. renaming a variable
  • test ๐Ÿ”ฌ: adding missing tests, refactoring tests; no production code change
  • chore ๐Ÿšธ: updating grunt tasks etc; no production code change

Message body (second line)

  • Use imperative, present tense
  • Includes motivation for the change and contrasts with previous behavior

Footer (third line)

  • Reference issues, as in Closes #123
  • Mention if change is breaking, as in BREAKING CHANGE: <more information>

Reference(s):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment