Re: VCS comparison table
- From
- Luben Tuikov <ltuikov@yahoo.com>
- Date
- Oct 17, 2006, 00:29 UTC
- Message-ID
- <20061017002956.79736.qmail@web31807.mail.mud.yahoo.com>
- In-Reply-To
- <Pine.LNX.4.64.0610161625370.3962@g5.osdl.org>
--- Linus Torvalds <torvalds@osdl.org> wrote:
Show 12 quoted lines
> Well, in the git world, it's really just one shared repository that has > separate branch-namespaces, and separate working trees (aka "checkouts"). > So yes, it probably matches what bazaar would call a checkout. > > Almost nobody seems to actually use it that way in git - it's mostly more > efficient to just have five different branches in the same working tree, > and switch between them. When you switch between branches in git, git only > rewrites the part of your working tree that actually changed, so switching > is extremely efficient even with a large repo. > > So there is seldom any real need or reason to actually have multiple > checkouts. But it certainly _works_.
It does work, very well at that.
I have a directory for each separate branch and simply use cd(1) to change the current working directory to that branch. So, instead of "git checkout <branch>", I do "cd ../<branch>".
One only needs to watch out when one updates the repository. If there had been updates in those branches, then one needs to git-reset the "branch" directory... (you know what I mean) (For example when I come to work in the morning an sync up with home from my usb key...)
The script is called: Usage: git-mkdir-of-branch <original-directory> <branch> <new-directory> where <branch> is the name of an existing branch in <original-directory>/.git/refs/heads
and uses simple symbolic links and some git plumbing to do the job. It can be found in my git trees. I never bothered to send it out to Junio, since it could be considered heretic. ;-)
Luben