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

Re: git gc / git repack not removing unused objects?

From
Nicolas Pitre <nico@fluxnic.net>
Date
Feb 7, 2010, 01:16 UTC
Message-ID
<alpine.LFD.2.00.1002061935180.1681@xanadu.home>
In-Reply-To
<cccedfc61002060553w464d5d9drd582b3b3c3f35227@mail.gmail.com>
On Sat, 6 Feb 2010, Jon Nelson wrote:
Show 7 quoted lines
> Last night, the repo size was 153G after removing some commits and
> objects by way of git filter-branch.
> I'm using "du -sh" in the .git directory to determine the disk usage.
> 
> Before: 136G
> git repack -dAl
> After: 153G
Why are you using -A instead of -a ?
> Then, just to make sure of some things, I changed nothing and simply
> re-ran "git repack -dAl".
> After: 167G

Could you run 'git count-objects -v' before and after a repack in such cases as well?

> [pack]
>         packsizelimit = 256m
Why are you using this?
> pack.packsizelimit=2M
This is even worse.  150G / 2M per pack = approx 75000 packs.

What you should be aiming for is a _single_ pack for best performances. A couple packs is common and doesn't make much of a difference. A hundred packs is getting a bit large. But 75000 packs is totally insane.

Nicolas
Previous: Jon NelsonNext: Jon Nelson
Message 6 of 10 in “git gc / git repack not removing unused objects?”
  1. Jon NelsonFeb 5, 2010
  2. Nicolas PitreFeb 5, 2010
  3. Jon NelsonFeb 5, 2010
  4. Nicolas PitreFeb 5, 2010
  5. Jon NelsonFeb 6, 2010
  6. Nicolas PitreFeb 7, 2010
  7. Jon NelsonFeb 7, 2010
  8. Jon NelsonFeb 7, 2010
  9. Nicolas PitreFeb 8, 2010
  10. Jon NelsonFeb 8, 2010

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.