Skip to content

Commit

Permalink
doc updates for precommit git hooks (#131)
Browse files Browse the repository at this point in the history
  • Loading branch information
jessebot committed Dec 25, 2022
1 parent fdb5e42 commit 93487f0
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions docs/cli/git/git.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ overnight. And even if you git good, you might forget stuff. I forget stuff all
the time, so I have a doc here to help me remember all the little things.

## precommit hooks with `pre-commit`
I recently learned about [pre-commit][1]. I found it when looking at [ruff][2]
to see if it made sense for pre-commit hooks.
I recently learned about [pre-commit][1].

I found it when looking at [ruff][2] to see if it made sense for pre-commit hooks.

```yaml
repos:
Expand All @@ -34,6 +35,18 @@ hooks:
verbose: true
```
[nbdev](https://nbdev.fast.ai/tutorials/pre_commit.html) also has pre commit hooks:
```yaml
repos:
- repo: https://github.com/fastai/nbdev
rev: 2.2.10
hooks:
- id: nbdev_clean
- id: nbdev_export
```
## Ignore everything except a few files
Thanks to [this stackoverflow thread](https://stackoverflow.com/q/987142).
Expand Down

0 comments on commit 93487f0

Please sign in to comment.