Git Archaeology

Dig through the metadata.

Ally Piechowski on 2026-04-08:

Five git commands that tell you where a codebase hurts before you open a single file. Churn hotspots, bus factor, bug clusters, and crisis patterns.

git log --format=format: --name-only --since="1 year ago" | sort | uniq -c | sort -nr | head -20
git shortlog -sn --no-merges
git log -i -E --grep="fix|bug|broken" --name-only --format='' | sort | uniq -c | sort -nr | head -20
git log --format='%ad' --date=format:'%Y-%m' | sort | uniq -c
git log --oneline --since="1 year ago" | grep -iE 'revert|hotfix|emergency|rollback'

I tested these git commands at work on a couple of repositories I know well and saw roughly what I expected, so they're useful for repositories you're unfamiliar with. Very cool. Additionally, you can feed Ally's whole post into most major agent harnesses to produce a useful Skill that gathers the data and provides commentary.