Open gee4vee opened 1 year ago
use npm script and run npm cz
like:
{
"cz": "git commit -m ''"
}
Add ~/.bashrc or ~/.zshrc alias fn
git() {
local _cmd="$*"
if [ "$1" = "commit" ] && [ "${_cmd%%"--help"}" = "$_cmd" ]; then
shift 1; command git commit -m ''
else
command git "$@"
fi
}
ISSUE Thread: https://github.com/Zhengqbbb/cz-git/issues/87
@gee4vee Has this issue been resolved? I have the same problem and very confused, what is the cause of this problem
@gee4vee Hi, you can try to upgrade your git to the latest version. My problem has been solved by upgrading git. The cause of the problem should be that the hook of git commit bash is not compatible with commitizen and husky.
Description
We set up
cz
as a husky pre-commit hook but when we go through the prompts viagit commit
it produces an empty commit message invim
.These commands were executed to set it up:
Our
.husky/prepare-commit-msg
:Steps to reproduce
git commit
.Current behavior
The vim editor has an empty commit message and commitizen errors out due to an empty commit message.
Desired behavior
commitizen produces a commit message using information entered in prompts.
Screenshots
Environment
cz-cli@4.3.0 cz-customizable@7.0.0