VCS comparison table
Luben Tuikov
ltuikov at yahoo.com
Tue Oct 17 01:29:56 BST 2006
--- Linus Torvalds <torvalds at osdl.org> wrote:
> 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
More information about the bazaar
mailing list