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 on streamable: https://streamable.com/n0u5p webm: https://github.com/ColCh/git-commit-msg/blob/master/demo/demo.webm
This hook currently does that:
- Prepend emoji before git commit type. Predefined types are here:
Lines 13 to 24 in 24ee7be
- Mark words with predefined emoji defined here:
Lines 26 to 43 in 24ee7be
git-commit-msg/__tests__/__snapshots__/index.js.snap
Lines 49 to 79 in 24ee7be
- Try to infer git commit context. Example:
git-commit-msg/__tests__/__snapshots__/e2e.js.snap
Lines 5 to 8 in 24ee7be
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:
pass it like env variables
-
GIT_COMMIT_MSG_HOOK_SKIP_ADDING_EMOJIS
- completely disable emojis -
GIT_COMMIT_MSG_HOOK_SKIP_AUTO_SUGGEST
- disable emoji auto suggest