Reputation: 21931
Any commitizen users here?
Wanted behavior:
git commit
git cz
Current behavior:
git commit
git cz
, just default git interfaceUpvotes: 6
Views: 7409
Reputation: 86
yes you can do it with the git hooks. Just do the following as it is written on the https://commitizen.github.io/cz-cli/ site.
Add in the file .git/hooks/prepare-commit-msg (if the file is not present just create it) in your root folder of the project following lines:
#!/bin/bash
exec < /dev/tty && node_modules/.bin/git-cz --hook || true
If the file is already there just add the exec line and git commit
will now show the same menu as when git cz
.
Upvotes: 5
Reputation: 1327304
The commitizen/cz-cli
project suggests:
Now, simply use
git cz
instead ofgit commit
when committing.
If git-cz
is in your PATH
, you can call git cz
. But it won't overshadow git commit
, simply offer a different alternative.
Upvotes: 0