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

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

From
Tor Arvid Lund <torarvid@gmail.com>
Date
Mar 9, 2011, 21:06 UTC
Message-ID
<AANLkTimYE8qCz98u3r2HRmeCx7k0wd_cWp-tR+tSoKbD@mail.gmail.com>
In-Reply-To
<AANLkTikxPPo4pGqrvo4rdDUOwp1PYYEdcERVfXfLnsVh@mail.gmail.com>
On Wed, Mar 9, 2011 at 5:35 PM, Ruben Laguna <ruben.laguna@gmail.com> wrote:
Show 23 quoted lines
>> I just thought I'd mention that the git-remove-history script that you
>> mention does filter-branch on HEAD, and not using the --all parameter.
>> I thought --all was the best way to "catch all" branches in one go...
>>
>>    -- Tor Arvid
>>
>
> Much faster this way, thanks Tor,
>
> But it still gives the same result 88MB
>
>
> $ git branch -a
> * develop
>  master
>  remotes/origin/HEAD -> origin/develop
>  remotes/origin/develop
>  remotes/origin/experimental
>  remotes/origin/gh-pages
>  remotes/origin/master
>
> Finally I have deleted my public repo on github, created a new one and
> pushed master and develop to the new empty one.
Ah, that's why I got only 3.6M when i cloned just now ;)

FWIW (if you still want to figure it out...) - Whatever refs that your origin branches point to - their history and objects will *not* get deleted by git gc/prune/whatever. So if they point to commits which have these big jars in the history, that may be the cause. Also, when I do filter-branch, it saves the old refs in .git/refs/original so that I can revert it all those times when I screw it up ;)

Basically - since your "new" repo is so small, there is something in your original repo that refers to your large objects.

Have a good night.
    -- Tor Arvid
Previous: Ruben Laguna
Message 10 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.