Skip to content

Commit e242b13

Browse files
committed
Only run pre-commit on the changes in the current branch
1 parent b4177e4 commit e242b13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pre-commit install
1313
Afterwards, our suite of formatting tests run automatically before each `git commit`. You
1414
can also run these manually:
1515
```bash
16-
pre-commit run --all-files
16+
pre-commit run --files $(git diff --name-only master)
1717
```
1818
If a formatting test fails, it will fix the modified code in place and abort
1919
the `git commit`. After looking over the changes, you can `git add <modified files>`

0 commit comments

Comments
 (0)