@colch/git-commit-msg
v2.1.0
Published
Adds emojis and infers commit context for people who use conventional commits
Downloads
25
Maintainers
Readme
git-commit-msg
Adds emojis and infers commit context for people who use conventional commits
- install it as git hooks:
prepare-commit-msg
andcommit-msg
- follow git conventional commits: https://www.conventionalcommits.org/en/v1.0.0-beta.2/
- ???
- PROFIT
demo
demo on streamable: https://streamable.com/n0u5p webm: https://github.com/ColCh/git-commit-msg/blob/master/demo/demo.webm
more info
This hook currently does that:
- Prepend emoji before git commit type. Predefined types are here: https://github.com/ColCh/git-commit-msg/blob/24ee7befa462b624705908b8b698db3c1704bd04/index.js#L13-L24
- Mark words with predefined emoji defined here: https://github.com/ColCh/git-commit-msg/blob/24ee7befa462b624705908b8b698db3c1704bd04/index.js#L26-L43. Example: https://github.com/ColCh/git-commit-msg/blob/24ee7befa462b624705908b8b698db3c1704bd04/tests/snapshots/index.js.snap#L49-L79
- Try to infer git commit context. Example: https://github.com/ColCh/git-commit-msg/blob/24ee7befa462b624705908b8b698db3c1704bd04/tests/snapshots/e2e.js.snap#L5-L8
install
yarn global add @colch/git-commit-msg
add git-commit-msg
into prepare-commit-msg
and commit-msg
hooks:
git-commit-msg $1
to appear like that:
options
pass it like env variables
GIT_COMMIT_MSG_HOOK_SKIP_ADDING_EMOJIS
- completely disable emojisGIT_COMMIT_MSG_HOOK_SKIP_AUTO_SUGGEST
- disable emoji auto suggest