Code Monkey home page Code Monkey logo

git-commit-message-convention's Introduction

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
โญ :star: new or feature add new feature
๐Ÿ› :bug: bug fix bug issue
๐Ÿš‘ :ambulance: bug critical hotfix bug issue
๐Ÿ”’ :lock: security fix security issue
๐Ÿ“ˆ :chart_with_upwards_trend: performance fix performance issue
โšก :zap: improvement update backwards-compatible feature
๐Ÿ’ฅ :boom breaking update backwards-incompatible feature
โš ๏ธ :warning: deprecated deprecate feature
๐ŸŒ :globe_with_meridians: i18n update or fix internationalization
โ™ฟ :wheelchair: a11y update or fix accessibility
๐Ÿšจ :rotating_light: refactor remove linter/strict/deprecation warnings
๐Ÿ‘• :shirt: refactor refactoring or code layouting
โœ… :white_check_mark: test add tests, fix tests failur or CI building
๐Ÿ“ :pencil: docs update documentation
ยฉ๏ธ :copyright: docs decide or change license
๐Ÿญ :lollipop: example for example or demo codes
๐Ÿ’„ :lipstick: update update UI/Cosmetic
๐Ÿ†™ :up: update update other
๐Ÿšš :truck: update move or rename files, repository, ...
๐Ÿ”€ :twisted_rightwards_arrows: update merge conflict resolution
โž• :heavy_plus_sign: update add files, dependencies, ...
โž– :heavy_minus_sign: update remove files, dependencies, ...
๐Ÿ”› :on: update enable feature and something ...
โฌ†๏ธ :arrow_up: deps upgrade dependencies
โฌ‡๏ธ :arrow_down: deps downgrade dependencies
๐Ÿ“Œ :pushpin: deps pin dependencies
๐Ÿ”ง :wrench: config update configuration
๐Ÿ“ฆ :package: build packaging or bundling or building
๐Ÿณ :whale: build Dockerfile
๐Ÿฃ :hatching_chick: release initial commit
๐ŸŽŠ :confetti_ball: release release major version
๐ŸŽ‰ :tada: release release minor version
โœจ :sparkles: release release patch version
๐Ÿš€ :rocket: release deploy to production enviroment
๐Ÿ”– :bookmark: release tagged with version label
๐Ÿ”™ :back: revert revert commiting
๐Ÿšง :construction: wip WIP commiting

Ask to Be Creative!

Examples

new:

:star: new(graphite): add 'graphiteWidth' option

bug fix:

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

Closes #28

improve performance:

:chart_with_upwards_trend: performance(graphite): remove graphiteWidth option

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

revert:

:back: 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

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

License

MIT

MIT

git-commit-message-convention's People

Contributors

anselal avatar ejilay avatar kazupon avatar reactorscram avatar xeptore avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

git-commit-message-convention's Issues

๐Ÿ’ก question: what does this do?

Hi @kazupon. This looks really neat and I want to use it. Is this package meant to be installed globally, and then it checks your commit messages to make sure it follows the convention? Would you still use command git commit -m ..., and that's what it checks?

Thanks in advance.

Do you have any suggestion ?

Hey, I've created a small cli program to build commit message interactively by following the instructions given in this project. It does the purpose and works perfectly fine.

https://github.com/theapache64/ugh

What do you think ? Feel free to show me any error, bug or anti-patterns.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.