Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ exec < /dev/tty && node_modules/.bin/cz --hook || true

##### Husky

*Prior `husky` v5*:

For `husky` users, add the following configuration to the project's `package.json`:

```json
Expand All @@ -167,6 +169,16 @@ For `husky` users, add the following configuration to the project's `package.jso
}
```

*with husky >= v5*:

In [`husky v5`](https://typicode.github.io/husky/#/?id=announcement) you need to call the locally instared binaries using `npx`

in `.husky/prepare-commit-msg`:

```
exec < /dev/tty && npx --no-install cz --hook || true
```

> **Why `exec < /dev/tty`?** By default, git hooks are not interactive. This command allows the user to use their terminal to interact with Commitizen during the hook.

#### Congratulations your repo is Commitizen-friendly. Time to flaunt it!
Expand Down