-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there an option to bypass or opt out of the hooks? #206
Comments
yes you can just write |
also you can use |
oh thanks! I just learned about the |
Another, although radical option is to move the files in |
For anyone who arrives here from Google: You can also use the
|
I'm spreading this information around as it's super useful: As of |
@DesignByOnyx this does not seem to skip the |
@yrammos - if what you say is true, you should report a bug. However, looking at the code, it appears that husky exits early if you use husky/src/installer/getScript.ts Line 58 in 1286e3b
Also, if you are calling git commands from a child process (eg. through npm scripts in package.json), then you might need to forward any environment variables manually:
... and in your package.json: {
"scripts": {
"commit-my-code": "HUSKY_SKIP_HOOKS=$HUSKY_SKIP_HOOKS git commit"
}
} |
For commands like
(Documented at https://typicode.github.io/husky/#/?id=bypass-hooks).
|
Sometimes when I'm working on a project I might be experimenting in a branch and knowingly doing stuff that's wrong or might make my linter mad. Is there a way to tell husky to ignore my commit and not run a hook against it? I guess I could write this myself with an environment variable but it seems like a possibly useful husky option.
The text was updated successfully, but these errors were encountered: