Skip to content

Instantly share code, notes, and snippets.

@renoirtech
Forked from joshbuchea/semantic-commit-messages.md
Last active March 21, 2024 13:26
Show Gist options
  • Save renoirtech/0eb257ad92ab5554390142773e88a3f8 to your computer and use it in GitHub Desktop.
Save renoirtech/0eb257ad92ab5554390142773e88a3f8 to your computer and use it in GitHub Desktop.
Semantic Commit Messages

Semantic Branch Names

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

Format: <type>/<task-slug>

Examples

feature/registration-page
chore/update-deployment-workflow

More Examples:

  • feature: (new feature for the user, not a new feature for build script)
  • hotfix: (bug fix for the user, not a fix to a build script)
  • docs: (changes to the documentation)
  • chore: (updating grunt tasks etc; no production code change)

Semantic Commit Messages

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

Format: <type>: <subject>

Examples

FEATURE: Add registration page
^--^  ^------------^
|     |
|     +-> Summary in present tense.
|
+-------> Type: CHORE, DOCS, FEATURE, FIX, REFACTOR, STYLE, or TEST.
TEST: Add invalid username input coverage to registration tests
^--^  ^------------^
|     |
|     +-> Summary in present tense.
|
+-------> Type: CHORE, DOCS, FEATURE, FIX, REFACTOR, STYLE, or TEST.

More Examples:

  • FEATURE: (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)

References:

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