From dcd27d57cef515fae0f51bfa9759339caec00dcb Mon Sep 17 00:00:00 2001 From: Malin Freeborn Date: Sat, 11 Jan 2020 14:07:52 +0100 Subject: [PATCH] add git binary blob search --- data/git.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/data/git.md b/data/git.md index 1098b0f..3508bd3 100644 --- a/data/git.md +++ b/data/git.md @@ -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 + +``` +