PRE-COMMIT(1)
β¨ PRE-COMMIT β¨
okay so bestie, gather round, because this is pre-commit β the manual page for the framework that manages and maintains your multi-language pre-commit hooks. It lives in the User Commands corner of the manual-verse, and honestly? It's giving main character energy. π
πΈ NAME πΈ
pre-commit</purg> β a whole framework for managing and maintaining multi-language pre-commit hooks. no cap. that's literally the entire job description. π
π¦ SYNOPSIS π¦
pre-commit [-h] [-V]
{autoupdate,clean,gc,init-templatedir,install,install-hooks,migrate-config,run,sample-config,try-repo,uninstall,validate-config,validate-manifest,help,hook-impl} ...
so you either ask it for help, ask it for its version, or you pick one of those fifteen little subcommand girlies and let them cook. simple as. π«Ά
π OPTIONS π
π POSITIONAL ARGUMENTS π
here's the lineup, bestie β one bullet per subcommand, no skipping, no summarising, we are thorough in this house:
{autoupdate,clean,gc,init-templatedir,install,install-hooks,migrate-config,run,sample-config,try-repo,uninstall,validate-config,validate-manifest,help,hook-impl}
autoupdateβ auto-updates yourpre-commitconfig to the latest repos' versions. glow up your pins automatically β¨
cleanβ cleans outpre-commitfiles. a lil spring cleaning moment π§Ή
See pre-commit-clean(1).
gcβ cleans unused cached repos. garbage collection but make it cute ποΈβ¨
See pre-commit-gc(1).
init-templatedirβ installs the hook script in a directory that's intended for use withgit config init.templateDir. templated dirs, but make it pre-commit π
See pre-commit-init-templatedir(1).
installβ installs thepre-commitscript. the classic. the icon. the moment. π
install-hooksβ installs hook environments for all environments in the config file. quick lil heads-up: you may findpre-commit install --install-hooksmore useful π
See pre-commit-install-hooks(1).
migrate-configβ migrates list configuration to new map configuration. out with the old shape, in with the new π¦
See pre-commit-migrate-config(1).
runβ runs hooks. yeah. that one. the whole point. π₯
See pre-commit-run(1).
sample-configβ produces a sample.pre-commit-config.yamlfile. starter pack behaviour π
See pre-commit-sample-config(1).
try-repoβ tries the hooks in a repository. super useful for developing new hooks, fr fr π§ͺ
uninstallβ uninstalls thepre-commitscript. breaking up is hard to do π
validate-configβ validates.pre-commit-config.yamlfiles. vibe check, but for your config π«Ά
See pre-commit-validate-config(1).
validate-manifestβ validates.pre-commit-hooks.yamlfiles. same energy, different file π
See pre-commit-validate-manifest(1).
helpβ shows help for a specific command. the "bestie explain" button π
See pre-commit-help(1).
and yeah, hook-impl is in that braces list up there too β it just doesn't get its own little paragraph here. it's the mysterious quiet one. π
β OPTIONAL ARGUMENTS β
-h,--helpβ show a help message and exit. when in doubt, ask for help β¨-V,--versionβ show the program's version number and exit. for when you gotta know which girl you're dealing with π
π SEE ALSO π
the whole squad, all thirteen friends, all linked up, all iconic:
pre-commit-autoupdate(1), pre-commit-clean(1), pre-commit-gc(1), pre-commit-init-templatedir(1), pre-commit-install(1), pre-commit-install-hooks(1), pre-commit-migrate-config(1), pre-commit-run(1), pre-commit-sample-config(1), pre-commit-try-repo(1), pre-commit-uninstall(1), pre-commit-validate-config(1), pre-commit-validate-manifest(1), pre-commit-help(1)
and that's the whole page, bestie π«Ά go forth and hook responsibly. this was PRE-COMMIT(1) from the User Commands section, dated February 2025 β periodt. πβ¨
π¦ where this page comes from
- epel 10: pre-commit 4.7.0-1.el10_3 Β· MIT
- fedora 43: pre-commit 4.3.0-3.fc43 Β· MIT
- fedora 43: pre-commit 4.6.2-1.fc43
- fedora 43: pre-commit 4.7.0-1.fc43 Β· MIT
- fedora 44: pre-commit 4.5.1-2.fc44 Β· MIT
- fedora 44: pre-commit 4.6.2-1.fc44
- fedora 44: pre-commit 4.7.0-1.fc44 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms