Git hooks for automatic momentum tracking.

KeepGoing can watch your git activity to auto-save checkpoints, detect branch transitions, and keep your briefing current. Totally optional. Works without them.

What each hook does

Hook What it does When it fires File it touches
Shell hook Shows a briefing when you cd into a project On directory change (cd) ~/.zshrc, ~/.bashrc, or ~/.config/fish/config.fish
post-commit Auto-saves a checkpoint after each commit After git commit ~/.keepgoing/hooks/post-commit → _dispatcher.sh
post-merge Detects branch merges and pull completions After git merge or git pull ~/.keepgoing/hooks/post-merge → _dispatcher.sh
post-checkout Detects branch switches After git checkout or git switch ~/.keepgoing/hooks/post-checkout → _dispatcher.sh
post-rewrite Detects rebases and amends After git rebase or git commit --amend ~/.keepgoing/hooks/post-rewrite → _dispatcher.sh
Global gitignore Hides .keepgoing/ from git across all repos One-time setup ~/.gitignore_global

How it works

  • - KeepGoing uses core.hooksPath to install a single dispatcher script globally across all your git repos.
  • - The dispatcher runs your repo-local .git/hooks/ first, then KeepGoing logic. Your existing pre-commit linters, pre-push checks, and other hooks keep working.
  • - For pre-* hooks (pre-commit, pre-push, etc.), the dispatcher respects exit codes. If your linter fails, the commit is still aborted.
  • - KeepGoing hooks run in the background and never block your git operations.
  • - If a repo uses Husky or lefthook (local core.hooksPath override), the installer detects this and shows how to integrate manually.

Install

Run the interactive installer. It shows a checklist so you choose exactly what gets installed and what file each option modifies.

Terminal
keepgoing hook install

Note: If a repo uses Husky, lefthook, or another tool that sets core.hooksPath locally, KeepGoing detects this and shows a snippet to add to that tool's hooks. Your existing setup is never overwritten.

Uninstall

Removes all hook markers from your shell config and git hook files. Your existing hooks are left intact.

Terminal
keepgoing hook uninstall

Privacy

  • - KeepGoing hooks run locally. No data leaves your machine from the hooks themselves.
  • - Checkpoints are stored in .keepgoing/ in each project directory.
  • - The briefing staleness check uses your local gh CLI to check PR status. No KeepGoing servers are contacted.
  • - All hook code is open source and visible at ~/.keepgoing/hooks/ after install.

Related setup