Skip to content

Instantly share code, notes, and snippets.

@fazlearefin
Last active October 16, 2021 18:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fazlearefin/82a0f78628b09b9b29bfe08c6a41cc7b to your computer and use it in GitHub Desktop.
Save fazlearefin/82a0f78628b09b9b29bfe08c6a41cc7b to your computer and use it in GitHub Desktop.
git show all large blob objects
# ref: https://stackoverflow.com/questions/10622179/how-to-find-identify-large-commits-in-git-history
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment