Skip to content

Commit 2218990

Browse files
committed
docs(auto_check): update installation instructions to include 'prek' as an alternative to 'pre-commit'
1 parent 919bf52 commit 2218990

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

docs/tutorials/auto_check.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,22 @@ When a commit message fails validation, Git will reject the commit and display a
1010

1111
There are two common methods for installing the hooks:
1212

13-
### Method 1: Using [pre-commit](https://pre-commit.com/) (Recommended)
13+
### Method 1: Using [pre-commit](https://pre-commit.com/) or [prek](https://prek.j178.dev) (Recommended)
1414

15-
[pre-commit](https://pre-commit.com/) is a framework for managing and maintaining multi-language pre-commit hooks. It's the recommended approach as it handles hook installation, updates, and execution automatically.
15+
[pre-commit](https://pre-commit.com/) and [prek](https://prek.j178.dev) are frameworks for managing and maintaining multi-language pre-commit hooks. It's the recommended approach as it handles hook installation, updates, and execution automatically.
1616

1717
#### Step 1: Install pre-commit
1818

1919
```sh
2020
python -m pip install pre-commit
2121
```
2222

23+
or
24+
25+
```sh
26+
python -m pip install prek
27+
```
28+
2329
#### Step 2: Create `.pre-commit-config.yaml`
2430

2531
Create a `.pre-commit-config.yaml` file in your project root directory with the following content:
@@ -45,6 +51,12 @@ Install the configuration into Git's hook system:
4551
pre-commit install --hook-type commit-msg
4652
```
4753

54+
or
55+
56+
```bash
57+
prek install --hook-type commit-msg
58+
```
59+
4860
The hook is now active! Every time you create a commit, commitizen will automatically validate your commit message.
4961

5062
### Method 2: Manual Git hook installation

0 commit comments

Comments
 (0)