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

git repack vs git gc --aggressive

From
FNFelix Natter <fnatter@gmx.net>
Date
Aug 7, 2012, 18:22 UTC
Message-ID
<87zk66r28y.fsf@bitburger.home.felix>
hello,
I read this:
  http://metalinguist.wordpress.com/2007/12/06/the-woes-of-git-gc-aggressive-and-how-git-deltas-work/
where
  git repack -a -d --depth=250 --window=250
is mentioned as a (recommended) alternative to git gc --aggressive.

I am a bit confused, because the page also mentions that git gc --aggressive is recommended when a repo has been imported using git fast-import.

So my questions are:
1. is the above repack command (with --depth=500) safe? Of course I want
   to be absolutely sure that our repo will be consistent.
   Do I need another command ("git gc", "git prune") as well?
2. is it the right tool for the job or shall I use git gc --aggressive?
Thanks!
-- 
Felix Natter
Next: Jeff King
Message 1 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.