First, get a list of all objects with their sizes.
git rev-list --all --objects | awk '{print $1}' | git cat-file --batch-check > obj-sizes.txt
Show the largest object size.
cat obj-sizes.txt | awk '{print $3}' | sort -n | tail -1
Print out just the objects above a certain size. (I'm not happy that this requires a rev-list
per object.)
cat obj-sizes.txt | while read obj type size; do
if [ $size -gt 1000000 ]; then
echo $size $obj $type $(git rev-list --all --objects | grep $obj);
fi;
done