Gitwhy
Summary
Gitwhy applies AI to Git repositories to explain the reasoning behind individual code changes.
It ingests a repository's commit history and surfaces answers to questions about why a given line or block was introduced or altered. The core task sits in the space of onboarding, code review, and maintenance where commit messages are often terse or absent. Its main distinction is treating the version-control log as the primary data source instead of the current source files alone. No public pricing is listed. The largest limitation is dependence on the quality and completeness of existing commit data; repositories with squash merges or minimal messages yield shallow results.
Bottom line: *Use it to recover intent from commit history; skip it when the repository lacks descriptive commits.*
Community Benchmarks Community
Sign in to submit a benchmarkNo community benchmarks yet. Be the first to share a real-world data point.
Community Reviews
Sign in to write a reviewNo reviews yet. Be the first to share your experience.
Discussion Community
Sign in to commentNo discussion yet. Sign in to start the conversation.
Compare Gitwhy
Spotted incorrect or missing data? Join our community of contributors.
Sign Up to ContributeCommunity Notes & Tips Community
Sign in to contributeBe the first to contribute. General notes, observations, gotchas, and tips from people who use this tool day-to-day.
Hours Saved & ROI Stories Community
Sign in to contributeBe the first to contribute. Concrete time/cost savings, with context. e.g. "Cut my code review backlog from 4h to 45m per week."
Curated lists that include this category
When AI agents write code, the commit message captures the what. The reasoning — the rejected approaches, the trade-offs, the original prompt — stays locked in session transcript files that most teams never look at until they need them, and by then the files are gone. gitwhy reads those transcript files from Claude Code and Codex, maps them to git commits by timestamp and file path, and renders an interactive HTML report. Click any file in the project and the report shows the conversation thread that produced it: your prompt, the agent’s reasoning, the commit it produced — in order.
The differentiating feature is transcript preservation. Claude Code deletes session transcripts after 30 days with no warning and no recovery path — the project’s own GitHub issues (#59248, #62476) document this behavior. gitwhy copies those transcripts into the repository before the window closes, turning an ephemeral local cache into a versioned artifact. It also writes a GITWHY.md file that summarizes the accumulated reasoning, which an agent on a future session can read to understand why the codebase is structured the way it is.
gitwhy fits solo developers and small teams working heavily in Claude Code or Codex who need either an audit trail for AI-written code or a way to hand off context to a future session without starting from scratch. It does not fit teams using AI coding assistants that store transcripts differently or not at all — the script has no generic transcript format support beyond what Claude Code and Codex produce. Distribution is a single Python file via GitHub; there is no package install, no CLI wrapper, and no configuration UI, so teams expecting a managed integration will be writing their own setup.