Skip Husky Precommit Hook
·1 min
Table of Contents
Sometimes you need to make a quick commit without waiting for linting, tests, or formatting checks to complete. Maybe you’re on a broken branch and need to stash your work, or the CI will handle validation anyway.
The Fix #
Use the --no-verify flag:
git commit --no-verify -m "WIP: saving progress"
Or the shorthand:
git commit -n -m "WIP: saving progress"
This bypasses all client-side hooks configured by Husky (or any other git hooks manager).
When to Use This #
- Work-in-progress commits on feature branches where you’ll squash later
- Broken pre-commit hooks that you need to debug separately
- Time-sensitive hotfixes when CI will validate the code anyway
- Large reformatting commits where running prettier on every file takes ages
A Word of Caution #
Skipping hooks means skipping guardrails. Use this intentionally, not habitually. If you find yourself reaching for --no-verify on every commit, it might be time to fix or optimize your hooks instead.