I referred Google's Angular JS's contributor's commit message guidelines to format commit messages. This leads to more unified and readable messages helping further history lookups and even CI integrations.
By the way, this repository's commit messages format is not exactly same as the one suggested above.
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>
The header is mandatory and the scope of the header is optional.
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.
Samples: (even more samples)
docs(README): update README adding instruction on how to start docker on EC2
build(babel): Add babel preset-env
Add @babel/core, @babel/preset-env and register with @babel/register.
Entry point of the application is set to be bin/www_es6.js
Refer to the package.json file to fidn out more.
If the commit reverts a previous commit, it should begin with revert:
, followed by the header of the reverted commit. In the body it should say: This reverts commit <hash>.
, where the hash is the SHA of the commit being reverted.
Should be one of the following:
- 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: Circle, BrowserStack, SauceLabs)
- docs: Documentation only changes
- feat: A new feature
- fix: A bug fix
- perf: A code change that improves performance
- 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
- misc: Adding miscellaneous items
There's no specific recommendations for naming scope yet. Feel free to write your own scopes.
The subject contains a succinct description of the change:
- use the imperative, present tense: "change" not "changed" nor "changes"
- do capitalize the first letter
- no dot (.) at the end
Just as in the subject, use the imperative, present tense: "change" not "changed" nor "changes". If the commit derives changes from previous behavior, 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
Follow git-flow to manage branches. For branch history, see the branches on this repository.
Use SemVer for versioning. For the versions available, see the tags on this repository.