The four hooks (post-checkout, post-commit, post-merge, pre-push) were generic git-lfs boilerplate that called 'git lfs <action>' for each event. Under the global core.hooksPath, they required git-lfs on PATH at every git invocation — which broke under launchd's stripped PATH (discovered 2026-04-16 while fixing gitvault). A repo that actually uses LFS can install its local hooks via 'git lfs install' within the repo (.git/hooks/*). The global hookspath shouldn't require LFS to be present. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Git Hooks
This directory contains global git hooks that can be used across all repositories.
Setup
- Configure git to use this directory for hooks:
git config --global core.hooksPath ~/dotfiles/git/hooks
- Make hooks executable:
chmod +x ~/dotfiles/git/hooks/*
Available Hooks
pre-commit: Run before each commitcommit-msg: Validate commit messagespre-push: Run before pushing
Per-Repository Hooks
To use repository-specific hooks instead of global ones:
git config --local core.hooksPath .git/hooks