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

Re: Optimizing repository speed

From
Theodore Tso <tytso@mit.edu>
Date
Feb 19, 2007, 15:14 UTC
Message-ID
<20070219151410.GG25490@thunk.org>
In-Reply-To
<17881.46642.843674.49482@lisa.zopyra.com>
On Mon, Feb 19, 2007 at 08:37:38AM -0600, Bill Lear wrote:
Show 7 quoted lines
> As part of our conversion to git 1.5, I would like to ensure that
> our code repository does not get crufty and slow.  Currently, I have
> a cron job that runs each morning that does a 'git repack -a -d'.
> 
> I know there is 'git-gc', and it appears to do all sorts of good
> things.  Can I simply replace my call to 'git repack -d -a' with 'git
> gc', or is there anything else I might want to do?

git-gc is a strict superset of git repack -a -d. Specifically, what it does is:

git-pack-refs --prune git-reflog expire --al git-repack -a -d -l git-rerere gc

It will also through in a git-prune if you do add --prune to the git-gc call, but you really don't want to run that out of a cron job.

Regards,
						- Ted
Previous: Bill Lear
Message 2 of 2 in “Optimizing repository speed”
  1. Bill LearFeb 19, 2007
  2. Theodore TsoFeb 19, 2007

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.