Each commit message consists of a header, a body and a footer. The header is mandatory The header has a special format that includes a type, a scope and a subject:
<type>[optional scope]: <subject>
<BLANK LINE>
[optional body]
<BLANK LINE>
[optional footer]
The header is mandatory and the scope of the header is optional. The footer should contain any information about Breaking Changes and is also the place to a closing reference to an issue if any.
- fix: a commit of the type fix patches a bug in your codebase (this correlates with
PATCH
in semantic versioning). - feat: a commit of the type feat introduces a new feature to the codebase (this correlates with
MINOR
in semantic versioning). - BREAKING CHANGE: a commit that has the text
BREAKING CHANGE:
at the beginning of its optional body or footer section introduces a breaking API change (correlating withMAJOR
in semantic versioning). A BREAKING CHANGE can be part of commits of any type. - Others: commit types other than
fix:
andfeat:
are allowed, for example:- build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
- ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
- docs: Documentation only changes
- perf: Performance improvements
- refactor: A code change that neither fixes a bug nor adds a feature
- style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
- test: Adding missing tests or correcting existing tests
Appears under "Features" header, compiler
subheader:
feat(compiler): add 'comments' option
Appears under "Bug Fixes" header, v-model
subheader, with a link to issue #28:
fix(v-model): handle events on blur
close #28
Appears under "Performance Improvements" header, and under "Breaking Changes" with the breaking change explanation:
perf(core): improve vdom diffing by removing 'foo' option
BREAKING CHANGE: The 'foo' option has been removed.
Commit message with description and breaking change in body:
feat: allow provided config object to extend other configs
BREAKING CHANGE: `extends` key in config file is now used for extending other config files
Commit message with no body:
docs: correct spelling of CHANGELOG
Commit message with scope:
feat(lang): add polish language
Commit message for a fix using an (optional) issue number:
fix: correct minor typos in code
see the issue for details on the typos fixed
closes issue #12