See https://pre-commit.com/#install.
Create a similar file shown in below content named .pre-commit-config.yaml at the root of your repository.
repos:
- repo: https://github.com/techcloud0-playground/pre-commit-hooks
rev: <VERSION> # https://github.com/techcloud0-playground/pre-commit-hooks/releases
hooks:
- id: keep-sorted
# See `.pre-commit-hooks.yaml` for available hooks.pre-commit installpre-commit uninstall -t pre-commit -t pre-merge-commit -t pre-push -t prepare-commit-msg -t commit-msg -t post-commit -t post-checkout -t post-merge -t post-rewriterm --force --recursive ~/.cache/pre-commit