Created
July 3, 2017 13:55
-
-
Save waleedsamy/5d72073658b029e93f0081f7b358a294 to your computer and use it in GitHub Desktop.
find which files have the biggest size in git repo
This file contains hidden or 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
# https://stackoverflow.com/a/42544963/5318264 | |
brew install coreutils findutils gnu-tar gnu-sed gawk gnutls gnu-indent gnu-getopt | |
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 \ | |
| gcut --complement --characters=8-40 \ | |
| gnumfmt --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