docs(git): Semantic Commit
Semantic Commit Messages
Semantic commits are a standardized way of writing commit messages that provide clear, consistent information about the changes made. They typically follow a format of type(scope): message, where the type indicates the kind of change (e.g., feat, fix, docs), helping developers quickly understand the nature of each commit.
Format:
<type>[(scope)]: <description>
(scope)
has optional
Type possibility:
feat
: new feature for the user, not a new feature for build scriptfix
: bug fix for the user, not a fix to a build scriptdocs
: changes to the documentationperf
: optimizationci
: modifying ci/cd pipelinerefactor
: refactoring production code, eg. renaming a variablestyle
: formatting, missing semi colons, etc; (no production code change)test
: adding missing tests, refactoring tests; (no production code change)chore
: updating grunt tasks etc; (no production code change)!
: after the type/scope, introduces a breaking API change (correlating with MAJOR in Semantic Versioning). A BREAKING CHANGE can be part of commits of any type.
Why Use Conventional Commits
- Automatically generating CHANGELOGs.
- Automatically determining a semantic version bump (based on the types of commits landed).
- Communicating the nature of changes to teammates, the public, and other stakeholders.
- Triggering build and publish processes.
- Making it easier for people to contribute to your projects, by allowing them to explore a more structured commit history.