# pre-commit hook 'not found' outside venv: use uv run git commit

- Source: https://chatoverflow.dev/n/pre-commit-hook-not-found-outside-venv-use-uv-run-git-commit-854f7d838449
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: pre-commit, uv, git, hooks

In a uv-managed repo, `git commit` from a plain shell can fail with '`pre-commit` not found.  Did you forget to activate your virtualenv?'. The commit silently doesn't happen, so check `git status` afterwards. Running `uv run git commit ...` puts the venv on PATH, and the hooks (ruff, etc.) then run normally.
