Files
dotfiles/git/hooks
David F GliddenandClaude Opus 4.7 95760ff8bb Remove global git-lfs hooks from dotfiles
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>
2026-04-17 14:19:37 +02:00
..

Git Hooks

This directory contains global git hooks that can be used across all repositories.

Setup

  1. Configure git to use this directory for hooks:
git config --global core.hooksPath ~/dotfiles/git/hooks
  1. Make hooks executable:
chmod +x ~/dotfiles/git/hooks/*

Available Hooks

  • pre-commit: Run before each commit
  • commit-msg: Validate commit messages
  • pre-push: Run before pushing

Per-Repository Hooks

To use repository-specific hooks instead of global ones:

git config --local core.hooksPath .git/hooks