git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Unable to shrink repository size

From
RDRobert Dailey <rcdailey.lists@gmail.com>
Date
Mar 6, 2014, 02:55 UTC
Message-ID
<CAHd499AW6nev81iVVhuoYfT0us28SSBDwbHCBa3teYB=cJR99g@mail.gmail.com>

I have a git-svn clone that I've been working on which is a full and complete conversion of our SVN repository at work.

It started out as 1.4GB (git count-objects -v, looking at 'size-pack'). I have run the following script to clean up a directory in the repo history that I suspect are huge (we had a third party library checked in that, uncompressed, was about 1.2GB in size):

------------------------------- files=$@ echo "Removing: $files..." git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch $files" -- --all

# remove the temporary history git-filter-branch otherwise leaves behind for a long time rm -rf .git/refs/original/ && git reflog expire --expire=now --all && git gc --aggressive --prune=now -------------------------------

Even though I seem to have removed it, the repository size (looking at 'size-pack' again) only went down about 200MB, so it's at 1.2GB now. There is about 3-5 years of commit history in this repository.

What I'd like to do is somehow hunt down the largest commit (*not* blob) in the entire history of the repository to hopefully find out where huge directories have been checked in.

I can't do a search for largest file (which most google results seem to show to do) since the culprit is really thousands of unnecessary files checked into a single subdirectory somewhere in history.

Can anyone offer me some advice to help me reduce the size of my repo further? Thanks.

Next: Elijah Newren
Message 1 of 5 in “Unable to shrink repository size”
  1. Robert DaileyMar 6, 2014
  2. Elijah NewrenMar 6, 2014
  3. Fredrik GustafssonMar 6, 2014
  4. Duy NguyenMar 6, 2014
  5. Jeff KingMar 6, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.