@@ -92,7 +92,50 @@ To install run the following:
92
92
pre-commit install
93
93
```
94
94
95
- A series of checks will now run when you make a git commit.
95
+ This will install the hooks in your local repository. From now on, a series of checks will
96
+ automatically run whenever you make a Git commit.
97
+
98
+ #### Running Pre-commit Manually
99
+
100
+ You can also run the pre-commit checks manually in various ways:
101
+
102
+ - ** Run pre-commit on all files (same as CI):**
103
+
104
+ To run the pre-commit checks across all files in your repository, use the following command:
105
+
106
+ ``` bash
107
+ pre-commit run --all-files
108
+ ```
109
+
110
+ This is the same set of checks that will run during CI, ensuring your changes meet the project's standards.
111
+
112
+ - ** Run pre-commit on a specific file:**
113
+
114
+ If you want to check or fix a specific file, you can do so by specifying the file path:
115
+
116
+ ``` bash
117
+ pre-commit run --files path/to/your/file.py
118
+ ```
119
+
120
+ This will only run the checks on the file(s) you specify.
121
+
122
+ - ** Run a specific pre-commit check:**
123
+
124
+ To run a specific check (hook) across all files or a particular file, use the following command:
125
+
126
+ ``` bash
127
+ pre-commit run < hook_id> --all-files
128
+ ```
129
+
130
+ Or for a specific file:
131
+
132
+ ``` bash
133
+ pre-commit run < hook_id> --files path/to/your/file.py
134
+ ```
135
+
136
+ Replace ` <hook_id> ` with the ID of the specific hook you want to run. You can find the list
137
+ of available hooks in the ` .pre-commit-config.yaml ` file.
138
+
96
139
97
140
## Alternatives to docker-compose
98
141
0 commit comments