Skip to content

Instantly share code, notes, and snippets.

View nmussat's full-sized avatar

Nicolas Mussat nmussat

View GitHub Profile
@nmussat
nmussat / find.repo.biggest.files
Created January 4, 2010 23:50
Find biggest files from a Git repository
#!/bin/bash
# Find biggest files from a Git repository
# See http://progit.org/book/ch9-7.html
MAX_FILES=20
LINES=`git verify-pack -v .git/objects/pack/pack-*.idx | grep blob | sort -k 3 -n | tail -${MAX_FILES}`
IFS=$'\n'
for LINE in $LINES
do