Komutan is a commit message template validator. Komutan creates a commit-msg hook for you and be sure of your commit messages suitable the Conventional Commits standards.
git clone github.com/utkudarilmaz/komutan
cd komutan
make install
make clean # Optional: delete the source code directory (current working directory)
- Download the latest binaries for release page.
- Untar the tar file with executing
tar -xzvf komutan.tar.gz
. - Move the executable to $PATH
mv komutan /usr/local/bin/komutan
.
Move to the directory of the repo you want to use for use Komutan and execute
komutan init
command on the repo root directory. That is all.
--> /home/utku
---> /home/utku/some-repo
cd /home/utku/some-repo
komutan init
Furthermore all of your commits checked by Komutan before commit process complete. If commit message is not valid commit process don't complete.
If you wish control your commit message before execute git commit -m "..."
you can execute komutan validate -m "commit message here"
or check commit
message from file komutan validate -f <path_of_commit_message>
.
If you want remove the commit message hook from your repository you just execute
rm -f <your_repo's_root_path>/.git/hooks/commit-msg
. That is all.
cd some-repository
rm -f .git/hooks/commit-msg
TYPE[SUB-TYPE]: DESCRIPTION
[BODY]
[FOOTER]
You can find more details on Conventional Commits about commit message rules.
- Commit message's header section (TYPE[SUB-TYPE]: DESCRIPTION) can't be more than 72 character.
- Description's first character must be one of [a-z-.].
- Description's last character can't be one of . , ! SPACE ? {} []
- feat
- docs
- style
- perf
- test
- fix
- refactor
- chore