PRE-COMMIT-INIT-TEMPLATEDIR(1)

πŸ“¦ version 4.7.0, in epel 10, fedora 43, fedora 44

πŸ’– 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 to auto. so if you want the rainbow always, you say always, and if you're in your no-color era, you say never ✨.
  • -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 a pre-commit config. 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:

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