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

From Aidan Van Dyk
Subject Re: Managing multiple branches in git
Date
Msg-id 20090602175750.GI23972@yugib.highrise.ca
Whole thread Raw
In response to Re: Managing multiple branches in git  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
* Alvaro Herrera <alvherre@commandprompt.com> [090602 13:25]:

> That's not the problem.  The problem is that it is kept in the same
> directory as the checked out copy.  It would be a lot more usable if it
> was possible to store it elsewhere.
> 
> Yes, the .svn directories are a PITA.

You can export GIT_DIR to make the .git directory be somewhere else...
and you'll probalby want a corresponding GIT_WORK_TREE (or core.worktree
config) set.

If your careful (i.e. don't make a mistake), you can set GIT_DIR and
GIT_INDEX_FILE AND GIT_WORK_TREE, and use a single "git repository"
among multiple independent "working directories".

That said, is the carefulness needed to work that worth the < 200KB
you save?

On a "referenced" style development repository:mountie@pumpkin:~/pg-work/REL8_3_STABLE$ du -shc .git/*4.0K
.git/branches4.0K   .git/config4.0K    .git/description4.0K    .git/HEAD48K     .git/hooks328K    .git/index8.0K
.git/info36K    .git/logs16K     .git/objects4.0K    .git/packed-refs32K     .git/refs488K    total
 

488K total in the .git directory, 328K of that is the index.

a.

-- 
Aidan Van Dyk                                             Create like a god,
aidan@highrise.ca                                       command like a king,
http://www.highrise.ca/                                   work like a slave.

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: It's June 1; do you know where your release is?
Next
From: Andrew Dunstan
Date:
Subject: Re: Managing multiple branches in git