Skip to content

Commit 331adff

Browse files
committed
docs(auto_check): update auto check installation by only keeping one example
1 parent 97fbae5 commit 331adff

File tree

1 file changed

+8
-15
lines changed

1 file changed

+8
-15
lines changed

docs/tutorials/auto_check.md

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,20 @@ 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/) or [prek](https://prek.j178.dev) (Recommended)
13+
### Method 1: Using pre-commit hook frameworks (Recommended)
1414

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.
15+
Using pre-commit frameworks is the recommended approach as hook installation, updates, and execution are handled automatically.
16+
These are two common pre-commit hooks:
17+
- [prek](https://prek.j178.dev) (faster)
18+
- [pre-commit](https://pre-commit.com/)
1619

17-
#### Step 1: Install pre-commit
18-
19-
```sh
20-
python -m pip install pre-commit
21-
```
22-
23-
or
20+
#### Step 1: Install prek
2421

2522
```sh
2623
python -m pip install prek
2724
```
2825

26+
2927
#### Step 2: Create `.pre-commit-config.yaml`
3028

3129
Create a `.pre-commit-config.yaml` file in your project root directory with the following content:
@@ -47,16 +45,11 @@ repos:
4745

4846
Install the configuration into Git's hook system:
4947

50-
```bash
51-
pre-commit install --hook-type commit-msg
52-
```
53-
54-
or
55-
5648
```bash
5749
prek install --hook-type commit-msg
5850
```
5951

52+
6053
The hook is now active! Every time you create a commit, commitizen will automatically validate your commit message.
6154

6255
### Method 2: Manual Git hook installation

0 commit comments

Comments
 (0)