Gitflow
🔎Find the Biggest Files in Repo HistoryHard+700 XP
Workshop
Scenario reference

Find the Biggest Files in Repo History: the situation, step by step

The situation

Clone times are 12 minutes. You suspect someone committed huge files years ago. Need to find them before excising.

rev-list + cat-file -s + sort surfaces the largest blobs in history.

Hard · 3 steps · +700 XP

What you will practice

This scenario walks through 3 steps, in order:

  1. 01Run object count to see repo weight
  2. 02List every object across all refs
  3. 03Aggressive gc to compact
Reveal the step-by-step commands

Try the terminal first — you learn more by doing. When you want to check yourself, here is the command for each step.

  1. 1. Run object count to see repo weight
    git count-objects -vH
  2. 2. List every object across all refs
    git rev-list --objects --all
  3. 3. Aggressive gc to compact
    git gc --aggressive --prune=now

Key takeaway

Use git-sizer or `git rev-list --objects --all` to audit history weight.