Re: Managing multiple branches in git

From: Greg Stark <greg(dot)stark(at)enterprisedb(dot)com>
To: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Managing multiple branches in git
Date: 2009-06-02 16:28:04
Message-ID: 1C074749-A938-414A-9482-4EA53CCEDBCC@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Yeah I was annoyed by the issue with having to reconfigure as well.

There are various tricks you can do though with separate repositories.

You could have the older branch repositories be clones of HEAD branch
repository so when you push from them the changes just go to that
repository then you can push all three branches together (not sure if
you can do it all in one command though)

You can also have the different repositories share data files which I
think will mean you don't have to pull other people's commits
repeatedly. (the default is to have local clones use hard links so
they don't take a lot of space and they're quick to sync anyways.)

There's also an option to make a clone without the full history but
for local clones they're fast enough to create anyways that there's
probably no point.

Incidentally I use git-clean -x -d -f instead of make maintainer-clean.

--
Greg

On 2 Jun 2009, at 17:07, "David E. Wheeler" <david(at)kineticode(dot)com>
wrote:

> On Jun 2, 2009, at 9:03 AM, Tom Lane wrote:
>
>> "David E. Wheeler" <david(at)kineticode(dot)com> writes:
>>> Yeah, with git, rather than cd'ing to another directory, you'd
>>> just do
>>> `git checkout rel8_3` and work from the same directory.
>>
>> That's what I'd gathered, and frankly it is not an acceptable answer.
>> Sure, the "checkout" operation is remarkably fast, but it does
>> nothing
>> for derived files. What would really be involved here (if I wanted
>> to
>> be sure of having a non-broken build) is
>> make maintainer-clean
>> git checkout rel8_3
>> configure
>> make
>> which takes long enough that I'll have plenty of time to consider
>> how much I hate git. If there isn't a better way proposed, I'm
>> going to flip back to voting against this conversion. I need tools
>> that work for me not against me.
>
> Well, you can have as many clones of a repository as you like. You
> can keep one with master checked out, another with rel8_3, another
> with rel8_2, etc. You'd just have to write a script to keep them in
> sync (shouldn't be too difficult, each just as all the others as an
> origin -- or maybe you have one that's canonical on your system).
>
> Best,
>
> David
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David E. Wheeler 2009-06-02 16:28:18 Re: Managing multiple branches in git
Previous Message Ron Mayer 2009-06-02 16:27:02 Re: PostgreSQL Developer meeting minutes up