TLDR Dev · LAUNCHES & TOOLS

PGIT: WHAT IF YOUR GIT HISTORY WAS A SQL DATABASE?

oseifert.ch13 min read

Summary from the TLDR Dev newsletter

pgit is a Git-like command-line interface that stores repository history in a PostgreSQL database, making its entire commit and file version history queryable via SQL. It uses pg-xpatch, a custom PostgreSQL storage engine with automatic delta compression, which often outperforms Git's aggressive compression mode. This allows for powerful programmatic analysis of codebase metrics like churn, coupling, and bus factor.