Repo Bloat: Finding Large Objects
I’ve written previously about trimming the fat on bloated Git repositories. Here I’ll present a convenient method for listing the largest objects in a human-friendly format. The first step in finding the largest objects is to list all objects. We can do this with verify-pack: $ git verify-pack -v .git/objects/pack/pack-{HASH}.idx 8306276cde4f3cff8cbe5598fd98bf10146da262 commit 254 170 9725 4677b7c11924cefa62393f0e3e7db6c06787815e tree 30 63 9895 1 08ce30d6550bed7725c399026d91fce24c86a79f 5062bde76952965ff5c473a7de0ae102b4d2c9f3 tree 1122 944 9958 1c1ef555c77ee527c95ca093f251313a6418c158 blob 10 19 10902 non delta: 15175 objects chain length = 1: 1672 objects chain length = 31: 10 objects chain length = 32: 4 objects ....