pre-commit
Framework for managing and maintaining multi-language pre-commit hooks in Git repositories.
pre-commit is a framework that manages and executes pre-commit hooks across multiple programming languages in Git repositories. It allows developers to define a configuration file that specifies which hooks to run before each commit, automating code quality checks, formatting, and validation tasks.
The tool supports hooks written in various languages and can automatically install dependencies for each hook in isolated environments. This ensures that code quality tools like linters, formatters, and security scanners run consistently across different development environments without requiring manual setup of each tool.
Developers and teams use pre-commit to enforce coding standards and catch issues before code enters the repository. The framework integrates with existing Git workflows and can be configured to run different sets of hooks for different file types or project requirements.
Alternatives & related tools
yadm
Dotfiles manager built on Git, with per-system alternate and templated files, encryption via GnuPG/OpenSSL/transcrypt/git-crypt, bootstrapping, and hooks.
git-lfs
Git extension for managing large files by storing them outside the repository with pointer files
git-secrets
Prevents committing passwords and sensitive information to git repositories using pattern matching and hooks
tig
ncurses-based text-mode interface for browsing Git repositories and staging changes
diff-so-fancy
Perl script that reformats git diff and unified diff output for readability, with cleaner headers, hunk markers, and stripped +/- symbols.
add a badge to your README
Maintain pre-commit? Show that it's featured on trmn. The badge links back to this page.
[](https://www.trmn.sh/tools/pre-commit?utm_source=badge)<a href="https://www.trmn.sh/tools/pre-commit?utm_source=badge"><img src="https://www.trmn.sh/badge/pre-commit.svg" alt="Featured on trmn" height="20"></a>