沙哑的预提交挂钩失败(添加--no-verify以绕过) [英] husky > pre-commit hook failed (add --no-verify to bypass)

查看:103
本文介绍了沙哑的预提交挂钩失败(添加--no-verify以绕过)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

突然我得到了"沙哑的>预提交挂钩失败(添加--no-verify以绕过)"我给出 git commit 时出现错误消息.

Suddenly I am getting the "husky > pre-commit hook failed (add --no-verify to bypass)" error message when I give the git commit.

我不知道我在做什么错.我也尝试过 git clean 命令.

I don't know what I am doing wrong. I tried git clean command too.

推荐答案

Husky可以防止出现错误的 git commit git push 等问题.如果遇到此错误,请检查您的 代码语法 ,以防万一您收到此错误,甚至您的代码也有效.请使用以下命令.

Husky can prevent you from bad git commit, git push and more. If you are getting this error check your code syntax, incase if you are getting this error even your code is valid. Please use the below command.

git commit -m "message" --no-verify

另一种解决方案是删除.git/hook文件夹,然后卸载并重新安装沙哑.与赫斯基生成的文件和.git/hook/文件可能会发生冲突.

Another solution is to delete the .git/hook folder and then uninstall and reinstall husky. There are chances for conflicts with husky generated files and .git/hook/ files.

某人已经引起了git bug问题 https://github.com/typicode/husky/Issues/462

Already git bug issue raised by someone https://github.com/typicode/husky/issues/462

这篇关于沙哑的预提交挂钩失败(添加--no-verify以绕过)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆