Re: RFC: Folder Git
- From
Jon Seymour <jon.seymour@gmail.com>
- Date
- Apr 25, 2011, 08:52 UTC
- Message-ID
- <BANLkTimnyv_+NCc3yOSswJeqHo_zsGwCDA@mail.gmail.com>
- In-Reply-To
- <BANLkTim=xKxN9JovToVuOg=SQ2Mba1LvxQ@mail.gmail.com>
On Mon, Apr 25, 2011 at 6:32 PM, Victor Engmark <victor.engmark@gmail.com> wrote: continue to other repositories.
Show 6 quoted lines
> > Issues: > * Don't know if anyone else has used it. Probably not, so there's > bound to be issues (especially since it's been changed quite a bit the > last couple days for this RFC). >
Victor,
Certainly seems like a common need. I had a similar solution which I used for a while.
In the end, however, I found that creating a super-module in the top directory that contains the other git directories as git submodules allowed me to use a standard feature of git to achieve the same effect.
So:
git submodule foreach git gc --aggressive
I know this won't suit every use case, but it does work in an environment where the set of repos you are operating on have a degree of coherence and it makes sense to set up a submodule for them. In this particular case this is the only reason why I use submodules - I don't use them for configuration management, for example, simply as a handy way to exploit git submodule foreach.
Have you considered using git submodules in this way?
jon.