Skip to content

Instantly share code, notes, and snippets.

@rtyley
Last active September 13, 2022 10:54
Show Gist options
  • Save rtyley/4202730 to your computer and use it in GitHub Desktop.
Save rtyley/4202730 to your computer and use it in GitHub Desktop.
Gets the top 500 biggest blobs in your repo, ordered by size they occupy when compressed in the packfile
git verify-pack -v .git/objects/pack/*.idx | grep blob | cut -c1-40,48- | cut -d' ' -f1,3 | sort -n -r --key 2 | head -500 > top-500-biggest-blobs.txt
@rtyley
Copy link
Author

rtyley commented Feb 4, 2013

Since writing this gist I've created The BFG Repo-Cleaner, a faster, simpler alternative to git-filter-branch for cleansing bad data out of your Git repository history:

  • Removing Crazy Big Files
  • Removing Passwords, Credentials & other Private data

The BFG is 10 - 50x faster than git-filter-branch, turning an overnight job into one that takes less than ten minutes.

http://rtyley.github.com/bfg-repo-cleaner/

@Erimus-Koo
Copy link

Is it possible to display the file name of the blobs?
Merge with git log --name-only or something else, I don't know how to do this, can you please tell me how?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment