All of lore.kernel.org
 help / color / mirror / Atom feed
* Reduce number of changes to pack file.
       [not found] <AANLkTikqaD7QPCCw86OgGvCHLz1ySu5CzQXoY2rAojxB@mail.gmail.com>
@ 2011-03-28  3:33 ` Chandra Sukiman
  2011-03-28 13:29   ` Joshua Juran
  2011-03-28 13:40   ` Santi Béjar
  0 siblings, 2 replies; 3+ messages in thread
From: Chandra Sukiman @ 2011-03-28  3:33 UTC (permalink / raw)
  To: git

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?

Thank you

Chandra

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Reduce number of changes to pack file.
  2011-03-28  3:33 ` Reduce number of changes to pack file Chandra Sukiman
@ 2011-03-28 13:29   ` Joshua Juran
  2011-03-28 13:40   ` Santi Béjar
  1 sibling, 0 replies; 3+ messages in thread
From: Joshua Juran @ 2011-03-28 13:29 UTC (permalink / raw)
  To: Chandra Sukiman; +Cc: git

On Mar 27, 2011, at 8:33 PM, Chandra Sukiman wrote:

> I am using git with Dropbox (see
> http://stackoverflow.com/questions/1960799/using-gitdropbox-together-effectively) 
> .

I don't see how this can end any way other than in pain.

> 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.

Thank you for making my point for me. :-)

> 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?

I'm going to answer a completely different question:  "Where should I  
host my Git repo?".  The answer is, on (a) one of the free hosting  
services like GitHub (if your project is public), (b) one of the pay  
services (like GitHub), or (c) your own Unix server.  I use (a) and (c).

You shouldn't be hosting a Git repository on a file-based  
synchronization service.  It's asking for trouble.

Josh

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Reduce number of changes to pack file.
  2011-03-28  3:33 ` Reduce number of changes to pack file Chandra Sukiman
  2011-03-28 13:29   ` Joshua Juran
@ 2011-03-28 13:40   ` Santi Béjar
  1 sibling, 0 replies; 3+ messages in thread
From: Santi Béjar @ 2011-03-28 13:40 UTC (permalink / raw)
  To: Chandra Sukiman; +Cc: git

On Mon, Mar 28, 2011 at 5:33 AM, Chandra Sukiman <tmcchandra@gmail.com> wrote:
> 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

>
> 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
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-03-28 13:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <AANLkTikqaD7QPCCw86OgGvCHLz1ySu5CzQXoY2rAojxB@mail.gmail.com>
2011-03-28  3:33 ` Reduce number of changes to pack file Chandra Sukiman
2011-03-28 13:29   ` Joshua Juran
2011-03-28 13:40   ` Santi Béjar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.