zlacker

[return to "Hk, a new Git hook manager"]
1. righth+K3[view] [source] 2025-02-17 16:43:57
>>DrBenC+(OP)
Git hooks are like make files for me. Copy/paste that `git staged files` command and then add your linter commands (in .githooks/pre-commit file). Add `set -e`. Set package manager post-install hook to config git to the `.githooks` dir.

Sadly I think git hook managers remove the simplicity of the whole design. Understandably since no one reads manuals anymore and projects don’t mind tacking on yet another module/plugin, however easy.

◧◩
2. warp+Hf[view] [source] 2025-02-17 17:49:22
>>righth+K3
100%, I was using husky because we were using it at work. But it turns out for my use-case all I needed was this in my package.json:

    "scripts": {
        "postinstall": "git config --local core.hooksPath etc/hooks"
    },
[go to top]