Skip to content

prek

Install prek

Mise

mise use -g prek

Make prek available as pre-commit for already installed hooks (not sure if this is needed):

ln -s ~/.local/share/mise/installs/prek/latest/prek-x86_64-unknown-linux-gnu/prek ~/bin/download/pre-commit

Install hooks

Needs to be done in every repository. See also FAQ: What does prek install --install-hooks do? and --install-hooks doesn't install all hooks

Install default pre-commit hook:

prek install --install-hooks
``

When you have other hooks than the default `pre-commit` hook configured:

```sh
prek install --install-hooks \
  --hook-type commit-msg \
  --hook-type pre-push
``

## Issues / feature requests

- [feat: global configuration](https://github.com/j178/prek/issues/58)