error: pathspec 'commit' did not match any file(s) known to git when using commitizen

504 Views Asked by At

Now I want to using commitizen to commit the git repo in linux Ubuntu 20.04.4 LTS , first install the commitizen(Node v16.14.2):

npm install -g commitizen

when I commit code using commitizen like this:

cz commit

show error like this:

error: pathspec 'commit' did not match any file(s) known to git

why did this happen? what should I do to fixed this problem?

1

There are 1 best solutions below

0
codeKiller09 On

Try use git cz instead of cz c or cz commit. It works for me.