Skip to content

Commit

Permalink
docs: fix pre-commit instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
Titus-von-Koeller committed Aug 21, 2024
1 parent fe8b3bc commit 6ae9859
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/source/contributing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@

### Setup pre-commit hooks
- Install pre-commit hooks with `pip install pre-commit`.
- Run `pre-commit autoupdate` once to configure the hooks.
- Re-run `pre-commit autoupdate` every time a new hook got added.
- Run `pre-commit install` once to install the hooks, so they will be run on every commit.
- If the hooks introduce changes, they'll be visible with `git diff`. Review them and `git add` them if everything is fine, then re-execute the before commit, it should pass now.
- If you want to manually trigger the hooks, you may do `pre-commit run --all-files`

Now all the pre-commit hooks will be automatically run when you try to commit and if they introduce some changes, you need to re-add the changed files before being able to commit and push.

Expand Down

0 comments on commit 6ae9859

Please sign in to comment.