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

Re: Reduce number of changes to pack file.

From
SBSanti Béjar <santi@agolina.net>
Date
Mar 28, 2011, 13:40 UTC
Message-ID
<AANLkTik19360G7t_cjimCFOAURnuJEA3ztnu3VACWLNV@mail.gmail.com>
In-Reply-To
<AANLkTimFKGrSCgBShtERaGfd=9y+=q-aHsN3u5Lvf52v@mail.gmail.com>
On Mon, Mar 28, 2011 at 5:33 AM, Chandra Sukiman <tmcchandra@gmail.com> wrote:
Show 15 quoted lines
> Hi,
>
> I am using git with Dropbox (see
> http://stackoverflow.com/questions/1960799/using-gitdropbox-together-effectively).
> Basically I created a bare repository at dropbox and everyone uses
> that for central repository.
> As the repository size is getting bigger, sometime during the git gc,
> it will create a huge .pack file (300 mb) which need to be uploaded
> and downloaded by everyone.
> I tried to limit the size of the pack to 10m (pack.packSizeLimit =
> 10m), but when doing gc, what happens now is that most of the pack
> files will get re-arranged and modified. This will cause the same
> upload/download issue that I want to solve.
>
> Is there any way for git gc to reduce the number of file changed?

Yes, you can mark those packs you want to keep creating an empty file in .git/objects/packs/ with the name of the pack but with .keep as the extension, i.e.:

.git/objects/pack/pack-f525c8673216b3302b4ec2b515e807a2dcfeff57.idx .git/objects/pack/pack-f525c8673216b3302b4ec2b515e807a2dcfeff57.keep .git/objects/pack/pack-f525c8673216b3302b4ec2b515e807a2dcfeff57.pack

HTH, Santi

Show 9 quoted lines
>
> Thank you
>
> Chandra
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
Previous: Joshua Juran
Message 3 of 3 in “Reduce number of changes to pack file.”
  1. Chandra SukimanMar 28, 2011
  2. Joshua JuranMar 28, 2011
  3. Santi BéjarMar 28, 2011

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.