* David E. Wheeler <[email protected]> [090602 11:56]: > 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.
But that looses his "configured" and "compiled" state...
But git isn't forcing him to change his workflow at all...
He *can* keep completely separate "git repositories" for each release
and work just as before. This will carry with it a full "separate"
history in each repository, and I think that extra couple hundred MB is
what he's hoping to avoid.
But git has concepts of "object alternates" and "reference
repositories". To mimic your workflow, I would probably do something
like:
## Make my reference repository, cloned from "offical" where everyone
pushes
moun...@pumpkin:~/projects/postgresql$ git clone --bare --mirror
git://repo.or.cz/PostgreSQL.git PostgreSQL.git
## Make my local master development repository
moun...@pumpkin:~/projects/postgresql$ git clone --reference
PostgreSQL.git git://repo.or.cz/PostgreSQL.git master
Initialized empty Git repository in
/home/mountie/projects/postgresql/master/.git/
## Make my local REL8_3_STABLE development repository
moun...@pumpkin:~/projects/postgresql$ git clone --reference
PostgreSQL.git git://repo.or.cz/PostgreSQL.git REL8_3_STABLE
Initialized empty Git repository in
/home/mountie/projects/postgresql/REL8_3_STABLE/.git/
moun...@pumpkin:~/projects/postgresql$ cd REL8_3_STABLE/
moun...@pumpkin:~/projects/postgresql/REL8_3_STABLE$ git checkout
--track -b REL8_3_STABLE origin/REL8_3_STABLE
Branch REL8_3_STABLE set up to track remote branch
refs/remotes/origin/REL8_3_STABLE.
Switched to a new branch 'REL8_3_STABLE'
Now, the master/REL8_3_STABLE directories are both complete git
repositories, independant of eachother, except that they both reference
the "objects" in the PostgreSQL.git repository. They don't contain the
historical objects in their own object store. And I would couple that
with a cronjob:
*/15 * * * git --git-dir=$HOME/projects/postgresql/PostgreSQL.git
fetch --quiet
which will keep my "reference" project up2date (a la rsync-the-CVSROOT,
or cvsup-a-mirror anybody currently has when working with CVS)...
Then Tom can keep working pretty much as he currently does.
a.
--
Aidan Van Dyk Create like a god,
[email protected] command like a king,
http://www.highrise.ca/ work like a slave.
signature.asc
Description: Digital signature
