PRE-COMMIT-INIT-TEMPLATEDIR(1)
π PRE-COMMIT-INIT-TEMPLATEDIR π
okay so this is pre-commit-init-templatedir, a little legend from the User Commands manual, and bestie it does exactly one thing and does it cute: it installs a hook script into a directory that's intended for use with... yeah, that's where the original page just kinda trails off, we don't make the rules π anyway, the hook script goes in the directory, that's the vibe.
β¨ SYNOPSIS β¨
pre-commit init-templatedir git config init.templateDir [-h]
[--color {auto,always,never}] [-c CONFIG] [--no-allow-missing-config]
[-t {commit-msg,post-checkout,post-commit,post-merge,post-rewrite,pre-commit,pre-merge-commit,pre-push,pre-rebase,prepare-commit-msg}]
directory
like yes, the invocation really is that long, she's high maintenance but she's worth it π
πΈ OPTIONS πΈ
π POSITIONAL ARGUMENTS
directoryβ the directory where we're writing the hook script. that's the spot. that's where it goes. periodt.
π¦ OPTIONAL ARGUMENTS
-h,--helpβ show a help message and exit. classic. iconic. your lil safety net when you forget how any of this works (no judgement, we've all been there π«Ά).--color {auto,always,never}β whether to use color in output. defaults toauto. so if you want the rainbow always, you sayalways, and if you're in your no-color era, you sayneverβ¨.-c,--config CONFIGβ path to an alternate config file. you're not stuck with the default one, you can point her wherever π.--no-allow-missing-configβ assume cloned repos should have apre-commitconfig. so like, don't be chill about a missing config, be strict about it π₯.-t,--hook-type {commit-msg,post-checkout,post-commit,post-merge,post-rewrite,pre-commit,pre-merge-commit,pre-push,pre-rebase,prepare-commit-msg}β pick which hook type you want. that's the whole list, all ten of them, no more no less:commit-msg,post-checkout,post-commit,post-merge,post-rewrite,pre-commit,pre-merge-commit,pre-push,pre-rebase,prepare-commit-msg. choose wisely bestie π
π SEE ALSO π
the whole girlies, go say hi:
pre-commit-autoupdate(1)pre-commit-clean(1)pre-commit-gc(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 obviously the mothership herself: pre-commit(1) π
ngl that's the whole page, there's no extra lore hiding in here, this is the full tea π
mwah π this lil page is dated February 2025 and it's part of the pre-commit family β go forth, install those hooks, and slay β¨π¦
π¦ 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