Git commit report error husky > pre-commit (node v14.19.3)

1. Error message

Git commit report error husky > pre-commit (node ​​v14.19.3)

2. The reason for the error

        Uses husky , a pre-commit (client) hook that runs code style checks before Git types commit messages  . If the code does not conform to the corresponding rules, an error will be reported (I use sourceTree to submit the code) .

3. Solutions

        The first solution: you need to submit the code according to the code style,  and submit the code according to the code constraints in the .eslintrc  file, so that there will be no corresponding code format detection errors.

        The second solution: add --no-verify (specification)   after use

git commit -m "备注信息" --no-verify

        

Guess you like

Origin blog.csdn.net/qq_24518001/article/details/128162152