在推动react本机项目时,由于husky pre push失败,我遇到了错误
Husky>预推挂钩失败(添加--不验证到旁路)
显示的所有这些错误都是lint错误,如下所示

unused-vars

27:48  error    Trailing spaces not allowed
                     no-trailing-spaces

75:5   warning  Unexpected console statement
                     no-console

92:93  error    Unexpected trailing comma
                        comma-dangle

96:81  error    Unexpected trailing comma

如何在Mac上的SourceTree应用程序上关闭此功能?

最佳答案

终于找到了解决办法。
问题(即使不是问题!)是因为react创建的钩子。我只是删除了git的hooks文件夹,该文件夹定义了预提交钩子,因此可以在提交钩子之后进行推送。
编辑:当您提供git命令行参数时,也可以跳过钩子-不验证,或者使用sourcetree的绕过提交钩子设置(在提交消息字段右上角的菜单中)

08-27 23:58