Git
Useful links
Remove large files from history
Run the following code as bash script:
# https://stackoverflow.com/questions/10622179/how-to-find-identify-large-commits-in-git-history
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
You will get a result like:
f3f039606062 60MiB maxmind-geolite2-city/GeoLite2-City.mmdb
8a4fc487fc49 62MiB plugins/GeoLite2-City.mmdb
7d73e8b734a2 63MiB maxmind-geolite2-city/GeoLite2-City.mmdb
Run the following command (replace, a, b and c with file names)
git filter-branch --index-filter 'git rm --cached --ignore-unmatch a b c' HEAD
You might have to install coreutils:
brew install coreutils