gitmit is a interactive command line tool so that you can easily use emoji and conventional commit format. Inspire by gitmoji.carloscuesta.me and commitizen.github.io/cz-cli.
Please make sure you have been installed Node.js.
Installation is as simple as running the following command with npm:
$ npm i -g gitmit
gitmit will output help information and examples when --help is used.
$ gitmit --help
Just simply use gitmit instead of git commit when committing. Then gitmit will start the interactive commit client, to auto generate your commit based on your prompts.
$ gitmit
If you want to use emoji in commit message such as github.com/sqrthree/gitmit, just with -m option.
$ gitmit -e
As you know, lots of projects have some commit message conventions. when you use gitmit with -c option, you'll be prompted to fill out any required commit fields at commit time. No more digging through CONTRIBUTING.md to find what the preferred format is.
$ gitmit -c
Also, you can use gitmit with both -c and -e
$ gitmit -c -e
Default, we will use AngularJS's commit message convention. but you can custom your own conventions with a .conventional-commit-types.json file.
If your project directory has a .conventional-commit-types.json file such as src/data/conventional-commit-types.json, gitmit will autoload your custom file when you run it in this directory.
If you want to keep it wherever you are, yon can create a .conventional-commit-types.json file in your home directory, gitmit will autoload it.
Search using specific keywords to find the right gitmoji.
$ gitmit search bug
$ gitmit search bug lint
Run command hook with --init option, gitmit will auto add a hook to your .git config. After you add your changes and commit them, the prompts will begin and your commit message will be built.
$ gitmit hook --init // init a git hook.
... // do anythings what you want.
$ git add .
$ git commit
You can alse init a hook with -e and -c:
$ gitmit hook --init -e
If you want remove gitmit hook, just run gitmit hook with --remove option.
$ gitmit hook --remove // remove gitmit hook
Have fun. :)