All Projects â†’ kazupon â†’ Git Commit Message Convention

kazupon / Git Commit Message Convention

Licence: mit
📝 Extend git commit message from angular style

Programming Languages

javascript
184084 projects - #8 most used programming language

git-commit-message-convention

Extend git commit message from angular style

Commit Message Format

All Commit Message Format MUST meet this Text Format:

[:<Emoji>: ][<Type>[(<Scope>)]: ]<Subject>
[<BLANK LINE>]
[<Message Body>]
[<BLANK LINE>]
[<Message Footer>]

Types

Type Description
new for new feature implementing commit
feature for new feature implementing commit (equal new)
update for update commit
bug for bug fix commit
security for security issue fix commit
performance for performance issue fix commit
improvement for backwards-compatible enhancement commit
breaking for backwards-incompatible enhancement commit
deprecated for deprecated feature commit
i18n for i18n (internationalization) commit
a11y for a11y (accessibility) commit
refactor for refactoring commit
docs for documentation commit
example for example code commit
test for testing commit
deps for dependencies upgrading or downgrading commit
config for configuration commit
build for packaging or bundling commit
release for publishing commit
wip for work in progress commit
chore for other operations commit

If the prefix is the below types, it will appear in the changelog.

  • new (feature)
  • bug
  • performance
  • security
  • improvement
  • deprecated
  • breaking

Scope

The scope could be anything specifying place or category of the commit change. For example $location, $browser, $compile, $rootScope, ngHref, ngClick, ngView, feature1, etc...

Subject

The subject contains succinct description of the change:

  • use the imperative, present tense: "change" not "changed" nor "changes"
  • don't capitalize first letter
  • no dot (.) at the end

Message Body

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.

Message Footer

The Message Footer should contain any information about Notes and also Message Footer should be recommended GitHub Issue ID Reference, Ex. Issue #27, Fixes #1, Closes #2, Resolves #3.

Notes should start with the word NOTE: with a space or two newlines. The rest of the commit message is then used for this.

Revert

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 ., where the hash is the SHA of the commit being reverted.

Emojis

Emoji Raw Emoji Code Type Description
⭐ī¸ ⭐ī¸ new or feature add new feature
🐛 🐛 bug fix bug issue
🚑 🚑 bug critical hotfix bug issue
🔒 🔒 security fix security issue
📈 📈 performance fix performance issue
⚡ī¸ ⚡ī¸ improvement update backwards-compatible feature
đŸ’Ĩ :boom breaking update backwards-incompatible feature
⚠ī¸ ⚠ī¸ deprecated deprecate feature
🌐 🌐 i18n update or fix internationalization
â™ŋī¸ â™ŋī¸ a11y update or fix accessibility
🚨 🚨 refactor remove linter/strict/deprecation warnings
👕 👕 refactor refactoring or code layouting
✅ ✅ test add tests, fix tests failur or CI building
📝 📝 docs update documentation
Šī¸ Šī¸ docs decide or change license
🍭 🍭 example for example or demo codes
💄 💄 update update UI/Cosmetic
🆙 🆙 update update other
🚚 🚚 update move or rename files, repository, ...
🔀 🔀 update merge conflict resolution
➕ ➕ update add files, dependencies, ...
➖ ➖ update remove files, dependencies, ...
🔛 🔛 update enable feature and something ...
âŦ†ī¸ âŦ†ī¸ deps upgrade dependencies
âŦ‡ī¸ âŦ‡ī¸ deps downgrade dependencies
📌 📌 deps pin dependencies
🔧 🔧 config update configuration
đŸ“Ļ đŸ“Ļ build packaging or bundling or building
đŸŗ đŸŗ build Dockerfile
đŸŖ đŸŖ release initial commit
🎊 🎊 release release major version
🎉 🎉 release release minor version
✨ ✨ release release patch version
🚀 🚀 release deploy to production enviroment
🔖 🔖 release tagged with version label
🔙 🔙 revert revert commiting
🚧 🚧 wip WIP commiting

Ask to Be Creative!

Examples

new:

⭐ī¸ new(graphite): add 'graphiteWidth' option

bug fix:

🐛 fix(graphite): stop graphite breaking when width < 0.1

Closes #28

improve performance:

📈 performance(graphite): remove graphiteWidth option

The graphiteWidth option has been removed. The default graphite width of 10mm is always used for performance reason.

revert:

🔙 revert: new: add 'graphiteWidth' option

This reverts commit 667ecc1654a317a13331b17617d973392f415f02.

Support tools

conventional-changelog

You can use with conventional-changelog-cli and conventional-github-releaser.

e.g. conventional-changelog-cli:

$ npm i --save-dev git://github.com/kazupon/git-commit-message-convention.git
$ conventional-changelog -i CHANGELOG.md -s -n ./node_modules/git-commit-message-convention/convention.js -r 0

e.g. conventional-github-releaser:

$ conventional-github-releaser -n ./node_modules/git-commit-message-convention/convention.js -r 0

TODO

  • [x] support conventional commit tools (e.g. conventional-changelog)
  • [ ] lint
  • [ ] cli
  • [ ] create a conventional commit tools with golang

License

MIT

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].