Skip to content

Commit 6bc7bdf

Browse files
authored
docs: improve setup instructions for pre-commit
1 parent d55acad commit 6bc7bdf

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

docs/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ cz commit -s
101101
```
102102

103103
### Integrating with Pre-commit
104+
104105
Commitizen can lint your commit message for you with `cz check`.
105106
You can integrate this in your [pre-commit](https://pre-commit.com/) config with:
106107

@@ -119,6 +120,12 @@ After the configuration is added, you'll need to run
119120
pre-commit install --hook-type commit-msg
120121
```
121122

123+
Note that pre-commit discourages using `master` as a revision, and the above command will print a warning. You should replace the `master` revision with the [latest tag](https://github.com/commitizen-tools/commitizen/tags). This can be done automatically with:
124+
125+
```sh
126+
pre-commit autoupdate
127+
```
128+
122129
Read more about the `check` command [here](check.md).
123130

124131
### Help

0 commit comments

Comments
 (0)