Inspired by Git Commit Msg, Angular Commit Message Format and Conventional Commits
Each commit message consists of a header, a body and a footer. The header has a special format that includes a type, a scope, and a subject:
<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
Any line of the commit message cannot be longer 100 characters!
This allows the message to be easier to read on GitHub as well as in various Git tools.
Must be one of the following:
- feat: A new feature
- fix: A bug fix
- 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: Changes tests only
- docs: Changes to the documentation
- build: Changes to the dependencies, devDependencies, or build tooling
- ci: Changes to our Continuous Integration configuration
- chore: Changes to the auxiliary tools such as release scripts
The scope could be anything that helps specify the scope (or feature) that is changing.
Examples
- fix(select):
- docs(menu):
The (<scope>)
field is optional.
The subject contains a succinct description of the change:
- use the imperative, present tense: "change" not "changed" nor "changes"
- don't capitalize first letter
- no period (.) at the end
Just as in the subject, use the imperative, present tense: "change" not "changed" nor "changes". The body should include the motivation for the change and contrast this with previous behavior.
The footer should contain any information about Breaking Changes and is also the place to reference Jira issues that this commit Issue: TOBAGO-XXXX.