1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/pre-commit.md

25 lines
461 B
Markdown
Raw Normal View History

2021-03-02 04:11:46 -08: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`
- Update pre-commit config file to the latest repos' versions:
`pre-commit autoupdate`