Commit Messages - samuelkripto/styleguide GitHub Wiki
See how a minor change to your commit message style can make you a better programmer.
Format: <type>([scope]): <subject>
-
<type>-
featfor a new feature -
fixfor a bug fix -
docsfor documentation changes -
stylefor code changes/formatting without changing code logic -
refactorfor code changes without adding features or fixing bugs -
perffor performance optimizations and improvements -
testfor adding or correcting tests -
buildfor changes that affect the build system or external dependencies -
cifor changes to our CI configuration files or scripts -
chorefor other changes that do not modify source or test files -
revertfor reverting a previous commit
-
-
[scope]is an optional contextual information regarding the scope of the commit -
<subject>is the short summary/description of the change
feat(animation): add hat wobble
^--^^---------^ ^------------^
| | |
| | +-> Subject: summary/description in present tense.
| |
| +-------------> Scope: optional contextual information regarding the scope of the commit.
|
+------------------> Type: feat, fix, docs, style, refactor, perf, test, build, ci, chore, or revert.
More Examples:
-
feat: new feature for the user, not a new feature for build script -
fix: bug fix for the user, not a fix to a build script -
fix(auth): fix social media login bug -
docs: changes to the documentation -
docs(readme): update installation instructions -
style: formatting, missing semi colons, etc; no production code change -
refactor: refactoring production code, eg. renaming a variable -
perf(startup): improve startup performance from 5s to 2s -
test: adding missing tests, refactoring tests; no production code change -
chore: updating grunt tasks etc; no production code change
References: