subject may not be empty [subject-empty]
type may not be empty [type-empty]
✖ 主题不能为空[主题为空]
✖ 类型不能为空[类型为空]
查看列表 ls
帮助信息 pnpm -h
设置镜像 pnpm config set registry https://registry.npmmirror.com/
原因
在终端输入git commit -am "**",提交代码时
会触发pre-commit的钩子,他会在Git提交信息之前先做代码风格的检测
如果不符合相应规则,会报错
它的检测规则就是根据.git/hooks/pre-commit文件里面的相关定义
解决方案
提交代码commit时,忽略pre-commit校验的钩子,加上参数--no-verify
git add
git commit -m"feat 栏目页面" --no-verify
git push
1. 删除.git/hooks下的的pre-commit文件,重新commit文章来源:https://www.toymoban.com/news/detail-851143.html
2. 卸载husky文章来源地址https://www.toymoban.com/news/detail-851143.html
到了这里,关于git commit 导致报错subject may not be empty [subject-empty] type may not be empty [type-empty]的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!