Prepend the right emoji to your commit message from Gitmoji
- Install gitmoji-commit-hook package
$ npm install -g gitmoji-commit-hook
- Install the hook
$ cd any-git-initialized-directory
$ gitmoji-commit-hook --init
You can put unwanted emojis in a blacklist section by adding the name in a blacklist array in your package.json
:
{
"gitmoji": {
"blacklist": [
"card-file-box",
"beers"
]
}
}
A list of available emojis and their associated meanings can be found at gitmoji.carloscuesta.me
This package follow KISS principle, the only thing it does is to allow you to add an emoji from gitmojis list to your commit.
If you're looking for some other cool feature like search in gitmojis list, please consider gitmoji-cli
To run the linter: npm run lint
To run the unit test: npm test
To dry run the script:
node invoke.js --init # run the init setup
node invoke.js mock_hooks/COMMIT_EDITMSG # simulate a git commit
The code is available under the MIT license.