Skip to content

Instantly share code, notes, and snippets.

@fmnoise
Forked from joshbuchea/semantic-commit-messages.md
Last active January 25, 2023 21:22
Show Gist options
  • Save fmnoise/b9a5543125075d1197fde3f75535b54b to your computer and use it in GitHub Desktop.
Save fmnoise/b9a5543125075d1197fde3f75535b54b to your computer and use it in GitHub Desktop.
Semantic Commit Messages

Semantic Commit Messages

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

<scope> is optional

Example

feat: add hat wobble
^--^  ^------------^
|     |
|     +-> Summary in present tense.
|
+-------> Type: tech, docs, feat, fix, text, ref, test.

More Examples:

  • feat: new feature for the user, not a new feature for build script
  • fix: bug fix for the business logic, not a fix to a build script
  • ref: refactoring of business logic or removing a feature
  • text: text formatting, reword, etc
  • tech: technical code changes, eg. renaming a variable, update dependency version, etc, no business logic change
  • docs: changes to the documentation
  • test: adding missing tests, refactoring tests; no business logic code change

If commit introduces breaking change, it should be specified in square parents in the end of commit message eg

fix: only admins can delete users [breaking]

Semantically docs, text and test should never introduce breaking changes

Reference: https://www.conventionalcommits.org

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