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

Re: When to repack?

From
Jakub Narebski <jnareb@gmail.com>
Date
Jan 31, 2007, 12:58 UTC
Message-ID
<epq3nd$pv5$1@sea.gmane.org>
In-Reply-To
<17856.37016.341839.397309@lisa.zopyra.com>
[Cc: git@vger.kernel.org]
Bill Lear wrote:
Show 8 quoted lines
> We have a company repo used by many people throughout the day.  When/how
> can I repack this?  I have come to adopt this approach:
> 
> % mv project project.pack
> % cd project.pack
> % GIT_DIR=. git repack -a -d
> % cd ..
> % mv project.pack project

Repack is safe. You can do it on live repository. It does the save under temporary name and move to proper place on it's own.

By the way you can use "git --bare repack -a -d" instead of "GIT_DIR=. git repack -a -d"

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
Previous: Bill LearNext: Andreas Ericsson
Message 2 of 5 in “When to repack?”
  1. Bill LearJan 31, 2007
  2. Jakub NarebskiJan 31, 2007
  3. Andreas EricssonJan 31, 2007
  4. Johannes SchindelinJan 31, 2007
  5. Shawn O. PearceJan 31, 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.