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

Re: Large number of object files

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
Oct 24, 2012, 06:59 UTC
Message-ID
<CACsJy8CcMBJLV=urVoWOQABQzQkC6y35spPF+_3fW6dtJjHtvg@mail.gmail.com>
In-Reply-To
<CAMJd5AS1=Cf--0=1Xynxf1J-22fxBq05XjNGMcUep+ndAOO7ig@mail.gmail.com>
On Wed, Oct 24, 2012 at 12:21 PM, Uri Moszkowicz <uri@4refs.com> wrote:
> Continuing to work on improving clone times, using "git gc
> --aggressive" has resulted in a large number of tags combining into a
> single file but now I have a large number of files in the objects
> directory - 131k for a ~2.7GB repository.

Can you paste "git count-objects -v"? I'm curious why gc keeps so many loose objects around.

> Any way to reduce the number of these files to speed up clones?

An easy way to get rid of them is to clone the non-local way. Everything will be sent over a pack, the result would be a single pack in new repo. Try "git clone file:///path/to/source/repo new-repo". You can also try "git prune" on the existing repo (read its man page before use).

-- 
Duy
Previous: Uri MoszkowiczNext: Jeff King
Message 2 of 3 in “Large number of object files”
  1. Uri MoszkowiczOct 24, 2012
  2. Nguyen Thai Ngoc DuyOct 24, 2012
  3. Jeff KingOct 24, 2012

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.