Blog Supporters Resume
Part time open-sourcerer, Linux enthusiast, Rust fanatic

Bypassing other Git hooks

October 29, 2021 — (Last edited on October 29, 2021)


By default, Git already has the --no-verify option to bypass both pre-commit and commit-msg hooks, but that doens’t include other hooks like post-commit, pre-push and post-push


Remove execution permission for the given hook file:

chmod -x .git/hooks/post-commit

And re-add it when you need to enable the hook again:

chmod +x .git/hooks/post-commit