vendredi 20 mai 2022

Trouver les plus gros fichiers, supprimés ou non, d'un repository git

Lancer dans git bash ou un shell linux: 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

Aucun commentaire:

Enregistrer un commentaire