Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我最近安装了husky v6 - 我喜欢它。但有时我想避免运行它——是否有一些论据可以提供逃生舱口?
就在这里。Git 为钩子提供了一个--no-verify选项:pre-commit
--no-verify
pre-commit
这个钩子由 git-commit[1] 调用,并且可以用 --no-verify 选项绕过。它不带参数,并在获取建议的提交日志消息并进行提交之前被调用。
在启用此标志的情况下进行 git 提交会禁用 husky。