Table Of Contents
A summary of the Git commit message convention Conventional Commits.
Last Tended | |
---|---|
Planted | |
Status | Seed |
Definition
Conventional Commits is a convention for adding human and machine readable meaning to commit messages. Advantages:
- improves a team's shared understanding of a codebase by better communicating what a commit did through:
- structure
- clarity (through use of keywords)
- consistency
- makes it easier to write automated tools on top of:
- automatically generating CHANGELOGs
- automatically determining a semantic version bump (based on the types of commits landed)
- triggering build and publish processes based on commit type
Basic Example
Scope Example
A scope can be provided after a type to narrow the context.
Message Keywords
Key Word | Indicates | Correlates with SemVer |
---|---|---|
build | Build system changes | |
ci | CI configuration changes | |
docs | Documentation changes | |
feat | Introduce a new feature | MINOR v1.0.0 -> v1.1.0 |
fix | Patch a bug | PATCH v1.0.0 -> v1.0.1 |
perf | Performance improvements | |
test | Add missing / correct tests | |
refactor |
Information about SemVer can be found here.
Source