Semantic commit messages can help identify what exactly happened during a code commit and enhance readability, as well as search.

The general format for a semantic Git commit message 1is: <Type>: [Scope of change] - {Subject | Reference}

Conventional commit examples:

  • feat: add toolbar to user.vue - ticket-325
  • fix: add semicolon at customer signup method - ticket-472
  • docs: remove controller legacy class - ticket-829

List of types

TypeDescription
featNew feature for the app. No new dev or build features
fixBug fixes for the app. No fix to a dev or build feature
docsChanges to the app’s documentation
styleFormatting, missing semicolon, etc. No logic changes
refactorRefactoring, code abstraction
testAdd unit tests, test refactoring. No logic changes.
choreUpdating build tasks or scripts. No logic changes.
revertRevert a previous change

Footnotes

  1. https://www.conventionalcommits.org/en/v1.0.0/#specification