/notebook/git/find-large-files

Finding Large Files in repos


git rev-list --all --objects | awk '{print $1}' | git cat-file --batch-check | sort -k3n | tail -50 | awk '{print $1}' > items

full bash script:

while read -r largefile; do
    echo $largefile | awk '{printf "%s %s ", $1, $3 ; system("git rev-list --all --objects | grep " $1 " | cut -d \" \" -f 2-")}'
done <<< "$(git rev-list --all --objects | awk '{print $1}' | git cat-file --batch-check | sort -k3nr | head -n 20)"

About

I am an engineer and educator, having spent ten years as a professor. My goal is to help you build your knowledge of design and technology, get your hardware working, and propel your startup or small business. Get in touch!