pgit is a Git-like CLI that stores repository history in PostgreSQL using delta compression via a custom Table Access Method (pg-xpatch). It lets you query your entire commit history with SQL and provides built-in analyses for churn, coupling, hotspots, bus factor, and activity. Benchmarked against 20 real repositories (273k commits), pgit outcompresses `git gc --aggressive` on 12 out of 20 repos. The tool also works well as an interface for AI agents: a Claude agent produced a full codebase health report on Neon's repo in under 10 minutes using a 4-sentence prompt. pgit is not meant to replace git for daily workflows but excels at programmatic codebase history analysis.

11m read timeFrom oseifert.ch
Post cover image
Table of contents
What is pgit?Why Did I Build It?Benchmarks: git vs pgitUse Casespgit for AgentsWhat's Next

Sort: