Skip to content

Comment on Safe-commit-hook: prevent developers from checking in sensitive filesparent

Comments

I think the proposal was that a user can create global hooks on their user account. So if you put a hook in ~/.git/hooks, it will act as if it was in $PROJECT_DIR/.git/hooks, unless that specific repository has disabled global hooks.

If you do this, then developers only need to install the hooks once when they set up their machine, and then will already have them when they clone a repo.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.