🌐
pre-commit
pre-commit.com
pre-commit
To run individual hooks use pre-commit run <hook_id>. The first time pre-commit runs on a file it will automatically download, install, and run the hook. Note that running a hook for the first time may be slow.
🌐
GitHub
github.com › pre-commit › action
GitHub - pre-commit/action: a GitHub action to run `pre-commit` · GitHub
name: pre-commit on: pull_request: push: branches: [main] jobs: pre-commit: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v3 - uses: pre-commit/action@v3.0.1
Starred by 556 users
Forked by 208 users
🌐
Git
git-scm.com › book › en › v2 › Customizing-Git-Git-Hooks
Git - Git Hooks
The pre-commit hook is run first, before you even type in a commit message. It’s used to inspect the snapshot that’s about to be committed, to see if you’ve forgotten something, to make sure tests run, or to examine whatever you need to inspect in the code.
🌐
npm
npmjs.com › package › pre-commit
pre-commit - npm
April 28, 2026 - pre-commit will try to run your npm test command in the root of the git repository by default unless it's the default value that is set by the npm init script.
      » npm install pre-commit
    
Published   Apr 28, 2026
Version   2.0.0
🌐
Medium
medium.com › @bluebirz › lets-try-pre-commit-before-you-commit-3b3c6879e589
Let’s try: pre-commit before you commit | by bluebirz | Medium
August 9, 2025 - That’s why it’s called pre-commit. The concept is to have a configuration with desired hooks. Each hook will trigger a script to check our code, and all hooks in the configuration must be run before we commit the code to repo.
🌐
GitHub
github.com › pre-commit › pre-commit
GitHub - pre-commit/pre-commit: A framework for managing and maintaining multi-language pre-commit hooks. · GitHub
A framework for managing and maintaining multi-language pre-commit hooks. - pre-commit/pre-commit
Starred by 15.3K users
Forked by 977 users
Languages   Python 97.4% | R 2.0% | Shell 0.5% | Dockerfile 0.1% | Lua 0.0% | Ruby 0.0%
Find elsewhere
🌐
Stefanie Molin
stefaniemolin.com › articles › devx › pre-commit › setup-guide
How to Set Up Pre-Commit Hooks | Stefanie Molin
December 7, 2025 - Hooks can be written in any language available on your the machine, and they must be placed in the .git/hooks directory to be triggered — pre-commit install does this for us. The executable that will run our pre-commit-stage hooks has been installed as .git/hooks/pre-commit:
🌐
Adam Johnson
adamj.eu › tech › 2022 › 10 › 20 › pre-commit-various-ways-to-run-hooks
pre-commit: Various ways to run hooks - Adam Johnson
October 20, 2022 - pre-commit’s main mode of operation is to run hooks against changed files when you commit. But you can also run hooks without committing, using pre-commit run.
🌐
Atlassian
atlassian.com › git › tutorials › git hooks
Git Hooks | Atlassian Git Tutorial
December 16, 2025 - The pre-commit script is executed every time you run git commit before Git asks the developer for a commit message or generates a commit object. You can use this hook to inspect the snapshot that is about to be committed.
🌐
Research Software Engineering Sheffield
rse.shef.ac.uk › blog › pre-commit
Research Software Engineering Sheffield - pre-commit : Protecting your future self
October 10, 2022 - At regular points in your workflow ... pre-commit comes in to play because it will run all the hooks it has been configured to run against the files you are including in your commit....
🌐
Fig
fig.io › manual › pre-commit › run
pre-commit run [hook] | Fig
pre-commit run · pre-commit sample-config · pre-commit try-repo · pre-commit uninstall · pre-commit help · Run hooks · On this page · Arguments · Options ·
🌐
Xnok
xnok.github.io › infra-bootstrap-tools › docs › tools › pre-commit
Pre-commit: Your First Line of Defense for Clean Code · Infra Bootstrap Tools
2 weeks ago - Run a specific hook: To execute a single hook (e.g., to test its configuration or apply its changes without committing), use: pre-commit run <hook_id> Replace <hook_id> with the actual ID from your configuration file.
🌐
Medium
medium.com › @gnetkov › automating-code-quality-control-with-pre-commit-hooks-fdbc1ec5cfea
Automating Code Quality Control with Pre-commit Hooks | by Fedor GNETKOV | Medium
January 1, 2025 - Run Automatically: Every time you run git commit, the hooks are triggered and check your code for errors before the commit is completed. If any of the hooks fail (e.g., code formatting issues or test failures), the commit is rejected. Fix and Retry: You can fix the issues identified by the hooks and retry the commit. You can find more information about installing pre-commit on the official website: https://pre-commit.com/.
🌐
Semgrep
semgrep.dev › docs › extensions › pre-commit
Run scans on pre-commit - Semgrep
The pre-commit framework. Use these instructions to run pre-commit without logging in. You can still use custom rules or rules from the Semgrep Registry.
🌐
Switowski
switowski.com › blog › pre-commit-vs-ci
pre-commit vs. CI - Sebastian Witowski
November 28, 2023 - Conveniently, CI runs checks in the background - you push your code to the repository and move on to work on the next feature. And if something breaks, you get a notification. But if you work on a small- to medium-size project and don't go crazy with the number of checks and linters in your configuration, pre-commit will probably run in a split of a second (except for tests - they usually take much longer, but I will talk about them in a moment).
🌐
GitHub
github.com › ddanier › pre-commit-run-cmd
GitHub - ddanier/pre-commit-run-cmd: Run arbitrary commands in pre-commit hooks, while using the environment pre-commit provides (using additional_dependencies) · GitHub
Run arbitrary commands in pre-commit hooks, while using the environment pre-commit provides (using additional_dependencies) - ddanier/pre-commit-run-cmd
Author   ddanier