From 37e084278cad447679c43680f18a68e82a5094cd Mon Sep 17 00:00:00 2001 From: JounQin Date: Mon, 11 Mar 2024 14:20:02 +0800 Subject: [PATCH] docs: add notice about SKIP_INSTALL_SIMPLE_GIT_HOOKS environment --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 45c42d6..365a4c2 100644 --- a/README.md +++ b/README.md @@ -162,7 +162,15 @@ npm uninstall simple-git-hooks ### I want to skip git hooks! -You should use `--no-verify` option +If you need to bypass install hooks at all, for example on CI, you can use `SKIP_INSTALL_SIMPLE_GIT_HOOKS` environment variable at the first place. + +```sh +export SKIP_INSTALL_SIMPLE_GIT_HOOKS=1 + +npm install simple-git-hooks --save-dev +``` + +Or if you only need to bypass hooks for a single git operation, you should use `--no-verify` option ```sh git commit -m "commit message" --no-verify # -n for shorthand