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

why is my repo size ten times bigger than what I expected?

From
Ruben Laguna <ruben.laguna@gmail.com>
Date
Mar 5, 2011, 10:05 UTC
Message-ID
<AANLkTi=V3nEamocowbHovvV0U69nZgD70fysu1CQOwrR@mail.gmail.com>
In-Reply-To
<AANLkTimi+OnpdX+Y7jx1JaOmGbZc_XEgJFeK0PKLpu2o@mail.gmail.com>
Hi,

I had a repo which was big 143MB because it contained a bunch of jar files. So I decided to remove those completely from the history.

In short I used the git-large-blob [1] to find all the jars and used the git-remove-history script [2] which does the filter-branch thing, prune, etc.

I did this on all branches (that I know of) and now I can see that the jars are gone because I can't find them with git-large-blob.  and the repo size has dropped from 143Mb to 87Mb.

My concern is that 87Mb is still really big taking into account he
size of the project.  in fact if I run "git diff-tree -r -p $commit
|wc -c" for each commit and sum all I get 5.5Mb.

I also ran the git-rev-size [3] script that I found in this mailing list and I only see that the size grows steadly from commit to commit up to 1482731 bytes. So again how come the .git directory is 87MB?

So, Can anybody tell me if this repository size is "normal" for a project with 1.4MB source and 352 commits? Is there a better way to calculate the size (in bytes) of each commit?

Is there any other thing I could do to reduce and audit  the repository size?

Thanks in advance! Rubén

--- [1] http://stackoverflow.com/questions/298314/find-files-in-git-repo-over-x-megabytes-that-dont-exist-in-head [2] http://dound.com/2009/04/git-forever-remove-files-or-folders-from-history/ [3] http://markmail.org/message/762zzg5zckbiq2i7

Next: Pascal Obry
Message 1 of 10 in “why is my repo size ten times bigger than what I expected?”
  1. Ruben LagunaMar 5, 2011
  2. Pascal ObryMar 5, 2011
  3. Jonathan del StrotherMar 5, 2011
  4. Ruben LagunaMar 5, 2011
  5. Andreas SchwabMar 5, 2011
  6. Ruben LagunaMar 7, 2011
  7. Phillip SusiMar 8, 2011
  8. Tor Arvid LundMar 8, 2011
  9. Ruben LagunaMar 9, 2011
  10. Tor Arvid LundMar 9, 2011

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.