2025-03-14 21:59:59 -06:00
|
|
|
# pre-commit
|
|
|
|
|
|
|
|
|
|
> Create Git hooks that get run before a commit.
|
|
|
|
|
> More information: <https://pre-commit.com>.
|
|
|
|
|
|
|
|
|
|
- Install pre-commit into your Git hooks:
|
|
|
|
|
|
|
|
|
|
`pre-commit install`
|
|
|
|
|
|
|
|
|
|
- Run pre-commit hooks on all staged files:
|
|
|
|
|
|
|
|
|
|
`pre-commit run`
|
|
|
|
|
|
|
|
|
|
- Run pre-commit hooks on all files, staged or unstaged:
|
|
|
|
|
|
|
|
|
|
`pre-commit run --all-files`
|
|
|
|
|
|
|
|
|
|
- Clean pre-commit cache:
|
|
|
|
|
|
|
|
|
|
`pre-commit clean`
|
|
|
|
|
|
2025-07-24 22:27:13 -06:00
|
|
|
- Update pre-commit configuration file to the latest repos' versions:
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
`pre-commit autoupdate`
|