Re: Managing multiple branches in git - Mailing list pgsql-hackers

From David E. Wheeler
Subject Re: Managing multiple branches in git
Date
Msg-id C6E332AA-3ED2-4D21-8768-C0FA0A8AB87F@kineticode.com
Whole thread Raw
In response to Managing multiple branches in git  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Managing multiple branches in git  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Managing multiple branches in git  (Aidan Van Dyk <aidan@highrise.ca>)
List 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



pgsql-hackers by date:

Previous
From: "Markus Wanner"
Date:
Subject: Re: PostgreSQL Developer meeting minutes up
Next
From: "Kevin Grittner"
Date:
Subject: Re: User-facing aspects of serializable transactions