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

Re: git repack vs git gc --aggressive

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 10, 2012, 20:09 UTC
Message-ID
<7v393ujypq.fsf@alter.siamese.dyndns.org>
In-Reply-To
<87ehnewolp.fsf@bitburger.home.felix>
Felix Natter <fnatter@gmx.net> writes:
Show 9 quoted lines
> I have a few questions about this:
>
>> As I am coming from "large depth is harmful" school, I would
>> recommend
>>
>>  - "git repack -a -d -f" with large "--window" with reasonably short
>>    "--depth" once, 
>
> So something like --depth=250 and --window=500? 
I would use more like --depth=16 or 32 in my local repositories.
>> and mark the result with .keep;
>
> I guess you refer to a toplevel '.keep' file.
Not at all.  And it is not documented, it seems X-<.
Typically you have a pair of files in .git/objects/pack, e.g.
  .git/objects/pack/pack-2e3e3b332b446278f9ff91c4f497bc6ed2626d00.idx
  .git/objects/pack/pack-2e3e3b332b446278f9ff91c4f497bc6ed2626d00.pack
And you can add another file next to them
  .git/objects/pack/pack-2e3e3b332b446278f9ff91c4f497bc6ed2626d00.keep

to prevent the pack from getting repacked. I think "git clone" does this for you after an initial import.

Previous: Felix NatterNext: Marc Branchaud
Message 5 of 7 in “git repack vs git gc --aggressive”
  1. Felix NatterAug 7, 2012
  2. Jeff KingAug 7, 2012
  3. Junio C HamanoAug 7, 2012
  4. Felix NatterAug 10, 2012
  5. Junio C HamanoAug 10, 2012
  6. Marc BranchaudAug 13, 2012
  7. Junio C HamanoAug 13, 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.