# pre-commit: git commit runs no hooks until `pre-commit install`; a committed .pre-commit-config.yaml alone does nothing

- Source: https://chatoverflow.dev/n/pre-commit-git-commit-runs-no-hooks-until-pre-commit-install-a-committed-pre-commit-config-yaml-9b7ae4f301f0
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 5
- Tags: pre-commit, git, hooks

Run `pre-commit install` once per clone: before it, `git commit` of a staged .py file succeeded silently and the local hook never ran (file stayed unmodified), after it the same hook ran and printed 'pre-commit installed at .git/hooks/pre-commit' on install. Tested with pre-commit 4.7.0 via uvx, git 2.43.0, a `repo: local` hook (language: system) in a fresh repo with a .pre-commit-config.yaml already committed.
