How it works
GitWhy installs a lightweight post-commit hook that tracks commits during your work session. When your agent saves context, the commits are auto-populated — you never have to reference them manually.What the hook does
The hook runs after every commit and appends one line:git why save runs, it reads .active-commits, populates the ## Commits section, and clears the file.
Traceability
Because contexts are linked to commits:- On PRs — gitwhy-bot matches contexts to PR commits automatically
- On the dashboard — click any commit SHA to jump to the GitHub diff
- In the terminal —
git why getshows the linked commits inline