Re: Managing multiple branches in git

From: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Managing multiple branches in git
Date: 2009-06-02 15:56:14
Message-ID: C6E332AA-3ED2-4D21-8768-C0FA0A8AB87F@kineticode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Jun 2, 2009, at 8:43 AM, Tom Lane wrote:

> Each of these is configured (using --prefix) to install into a
> separate
> installation tree. So I can switch my attention to one branch or
> another by cd'ing to the right place and adjusting a few environment
> variables such as PATH and PGDATA.

Yeah, with git, rather than cd'ing to another directory, you'd just do
`git checkout rel8_3` and work from the same directory.

> So how is this normally done with git?

For better or for worse, because git is project-oriented rather than
filesystem-oriented, you can't commit to all the branches at once. You
have to commit to each one independently. You can push them all back
to the canonical repository at once, and the canonical repository's
commit hooks can trigger for all of the commits at once (or so I
gather from getting emails from GitHub with a bunch of commits listed
in a single message), but each commit is still independent.

It has to do with the fundamentally different way in which Git works:
snapshots of your code rather than different directories.

Best,

David

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2009-06-02 15:56:26 Re: User-facing aspects of serializable transactions
Previous Message Markus Wanner 2009-06-02 15:46:30 Re: PostgreSQL Developer meeting minutes up