Published on

Setting Up Commitizen on None Node Projects

Authors

This needed a bit of Googling but this issue had the solution:

npm i -g commitizen cz-conventional-changelog

echo '{ "path": "cz-conventional-changelog" }' > ~/.czrc; create .czrc

cd non-node-git-repo

# make some change to your repo
touch foo

# instead of using git commit use:
git cz -a

In the above, if you used yarn to global install instead:

yarn global add commitizen cz-conventional-changelog

Just remember to add yarn globals to your path:

export PATH="$(yarn global bin):$PATH"

To make this easier to use you can alias a git commit command for example:

alias gc='git cz -a'

If you are using WSL in Windows use wsltty as a terminal instead of the default to see emojis (among other things) in the terminal.