Skip to content

Instantly share code, notes, and snippets.

@MIB1700
Created May 10, 2021 09:00
Show Gist options
  • Save MIB1700/3f0ba4470df1e2be07d39da070326596 to your computer and use it in GitHub Desktop.
Save MIB1700/3f0ba4470df1e2be07d39da070326596 to your computer and use it in GitHub Desktop.
git committed sizes
git rev-list --objects --all |
git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' |
sed -n 's/^blob //p' |
sort --numeric-sort --key=2 |
cut -c 1-12,41- |
$(command -v gnumfmt || echo numfmt) --field=2 --to=iec-i --suffix=B --padding=7 --round=nearest
#from https://stackoverflow.com/questions/10622179/how-to-find-identify-large-commits-in-git-history
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment