Skip to content

Commit 2110a14

Browse files
authored
Merge pull request commitizen-tools#564 from slhck/patch-1
docs: improve setup instructions for pre-commit
2 parents 23be8a7 + 42e3dca commit 2110a14

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

docs/README.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ cz commit -s
101101
```
102102

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

107109
```yaml
@@ -128,6 +130,12 @@ If you aren't using both hooks, you needn't install both stages.
128130
| commitizen | commit-msg |
129131
| commitizen-branch | pre-push |
130132

133+
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:
134+
135+
```sh
136+
pre-commit autoupdate
137+
```
138+
131139
Read more about the `check` command [here](check.md).
132140

133141
### Help

0 commit comments

Comments
 (0)