add git binary blob search

This commit is contained in:
Malin Freeborn 2020-01-11 14:07:52 +01:00
parent 378da6e682
commit dcd27d57ce
1 changed files with 13 additions and 0 deletions

View File

@ -115,3 +115,16 @@ Finally, you can clone this repo from your original.
Gitlab requires more changes, such as going to `settings > repository` and switching the main branch, then stripping protection.
## Find Binary Blobs
```
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
```