Version the git hooks instead of copying them

dotfiles · Cursor · branch feat/hooks · claude-opus-5 · cwd /home/user/code/dotfiles · id 2ea379b6-df3d-18f9-9f70-dac6b22c8792 · 2026-08-31 15:28 · 2 msgs · 17 tools · 1 min read · updated 7 days ago

Hooks drifted between machines because they lived outside the repository.

tools: Read, Edit, Bash
← dotfiles Download .md
Tool calls
Edit Edit: 7 calls (50.0%) 7 Read Read: 4 calls (28.6%) 4 Bash Bash: 3 calls (21.4%) 3
Token usage20.7K total
Input17.5K
Cache creation0
Cache read0
Output3.2K
Cache hit ratio0%· cold cache

Hooks drifted between machines because they lived outside the repository.

Conversation

Turn 1 — User

My pre-push hook is different on each machine.

Turn 2 — Assistant

Moved the hooks into a tracked directory and pointed the hooks path at it, so they are versioned like anything else and updating is a pull.

The setup script wires the path, and the hook itself checks only the files in the push rather than the whole tree, which keeps it fast enough that nobody is tempted to skip it.

Turn 3 — User

What if someone needs to bypass it?

Turn 4 — Assistant

The standard no-verify flag still works. The point is that skipping is a deliberate act rather than the default state.

Subjects

  • [[Shell]]
  • [[Git]]
  • [[Configuration]]

Keyboard shortcuts

⌘K / Ctrl+KOpen command palette
/Focus search
g hGo to home
g pGo to projects
g sGo to sessions
j / kNext / prev row (tables)
?Show this help
EscClose dialogs

Structured queries

Mix key:value filters with free text in the palette:

type:sessionOnly session pages
project:llm-wikiFilter by project name (substring)
model:claudeFilter by model name (substring)
date:>2026-03-01Sessions after a date
date:<2026-04-01Sessions before a date
tags:rustPages mentioning a tag/topic
sort:dateSort results by date (newest first)

Example: type:session project:llm-wiki date:>2026-04 sort:date