Skip to content

Commit

Permalink
docs: add notice about SKIP_INSTALL_SIMPLE_GIT_HOOKS environment
Browse files Browse the repository at this point in the history
  • Loading branch information
JounQin committed Mar 11, 2024
1 parent 6149e83 commit 37e0842
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 37e0842

Please sign in to comment.