Re: Managing multiple branches in git

From: Andres Freund <andres(at)anarazel(dot)de>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Mark Mielke <mark(at)mark(dot)mielke(dot)cc>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "David E(dot) Wheeler" <david(at)kineticode(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Managing multiple branches in git
Date: 2009-06-02 19:58:57
Message-ID: 4A258481.6000807@anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 06/02/2009 09:38 PM, Alvaro Herrera wrote:
> Mark Mielke wrote:
>
>> I just don't understand why you care. If the CVS directories didn't bug
>> you before, why does the single .git directory bug you now? I'm
>> genuinely interested as I don't get it. :-)
>
> It doesn't. What bugs me is that the database (the "pulled" tree if you
> will) is stored in it. It has already been pointed out how to put it
> elsewhere, so no need to explain that.
>
> What *really* bugs me is that it's so difficult to have one "pulled"
> tree and create a bunch of checked out copies from that.
I dont see were the difficulty resides?

#Setup a base repository
cd /../master
git [--bare] clone git://git.postgresql.org/whatever .

#Method 1
cd /../child1
git clone --reference /../master/ git://git.postgresql.org/whatever .
cd /../child2
git clone --reference /../master/ git://git.postgresql.org/whatever .

This way you can fetch from the git url without problem, but when a
object is available locally it is not downloaded again.

#Method2
cd /../child3
git clone --shared /../postgresql/ child3
...
This way you only fetch from your "pulled" tree and never possibly from
the upstream one.

Andres

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2009-06-02 20:06:06 Re: Managing multiple branches in git
Previous Message Mark Mielke 2009-06-02 19:55:31 Re: Managing multiple branches in git