Last active
September 4, 2019 19:35
-
-
Save gnomeria/c93a545fe0ebf08621a1051ed4c12817 to your computer and use it in GitHub Desktop.
Find git file sizes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git rev-list --objects --all \ | |
| git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' \ | |
| awk '/^blob/ {print substr($0,6)}' \ | |
| sort --numeric-sort --key=2 \ | |
| cut --complement --characters=13-40 \ | |
| 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