The Hook (The "Byte-Sized" Intro)
--no-verify is an emergency exit, not the main door. Yes, sometimes you need to skip hooks — you're fixing a CI issue and need to push a one-line change immediately. But if you're using --no-verify on every commit, your hooks are either too slow, too strict, or checking the wrong things. Fix the hooks, not the habit.
📖 What is Skipping Hooks Safely?
Using --no-verify to bypass client-side hooks when necessary, while understanding the risks and maintaining accountability.
Conceptual Clarity
What --no-verify skips:
| Command | Hooks Skipped |
|---|---|
git commit --no-verify | pre-commit, commit-msg |
git push --no-verify | pre-push |
git merge --no-verify | pre-merge-commit |
What --no-verify does NOT skip:
| Hook Type | Can Be Skipped? |
|---|---|
| Client-side hooks | ✅ with --no-verify |
| Server-side hooks | ❌ Never |
| CI/CD checks | ❌ Never |
| Branch protection rules | ❌ Never |
Real-Life Analogy
--no-verify is like the emergency override on a fire door. It's there for real emergencies — but if you're using it every day, you have a bigger problem to fix.
Visual Architecture
Why It Matters
- Legitimate uses: Emergency fixes, documentation-only changes, WIP commits.
- Risks: Bypasses all client-side quality checks.
- Safety net: Server-side hooks and CI still catch issues.
- Culture signal: Frequent
--no-verifymeans hooks need improvement.
Code
# ─── Skip hooks (legitimate reasons) ───
git commit --no-verify -m "emergency: fix production crash"
git push --no-verify
# ─── Don't make it a habit ───
# If you skip frequently, fix the hook instead:
# - Too slow? → Use lint-staged (check only staged files)
# - Flaky? → Remove unreliable checks
# - Too strict? → Move heavy checks to pre-push or CI
# ─── Alternative: skip specific checks ───
# Instead of --no-verify, some tools support partial skip:
SKIP=lint git commit # Husky/pre-commit support
# ─── Track who skips hooks (team visibility) ───
# CI will catch what hooks missed
# PR reviews show if checks were skippedKey Takeaways
--no-verifyskips client-side hooks only — CI and server hooks still run.- Use it for emergencies, not as a daily habit.
- If you skip frequently, fix the hooks (too slow, too strict, flaky).
- Server-side hooks and CI are the ultimate safety net.
Interview Prep
-
Q: What does
--no-verifydo? A: It skips client-side hooks (pre-commit, commit-msg, pre-push). It does NOT bypass server-side hooks, CI/CD pipelines, or branch protection rules. -
Q: When is it appropriate to skip hooks? A: Emergency production fixes, documentation-only changes, or WIP commits that will be squashed before merge. It should be rare — if you skip regularly, the hooks need to be improved.
-
Q: What should you do if team members frequently skip hooks? A: Investigate why — hooks are probably too slow, too strict, or unreliable. Fix the root cause: use
lint-stagedto speed up, remove flaky checks, move heavy validations to CI.