Re: Switching heads and head vs branch after CVS import
- From
Linus Torvalds <torvalds@osdl.org>
- Date
- Aug 15, 2005, 00:46 UTC
- Message-ID
- <Pine.LNX.4.58.0508141737270.3553@g5.osdl.org>
- In-Reply-To
- <46a038f905081417241f9598cc@mail.gmail.com>
On Mon, 15 Aug 2005, Martin Langhoff wrote:
Show 5 quoted lines
> > After having done a cvs import of Moodle using git-cvsimport-script > all the cvs branches show up as heads. How do I switch heads within a > checkout? cogito doesn't seem to be able to, and I'm unsure on how to > do it with git.
Just do
git checkout branch-name
to switch between them.
One thing that "git cvsimport" does not know to do is to show when a branch was merged back into the HEAD. That would be a very interesting thing to see, but I don't think there's any way to get that information out of CVS (so you'd have to basically make an educated guess by looking at the changes).
So in a cvsimport, you'll never see a merge back to the head, even if one technically took place.
> And I am confused about the difference between heads and branches.
Confusion of naming.
branches and heads are the same thing in git. However, largely due to historical reasons, I encouraged "one tree pre branch", and then you had "external branches" which were totally separate repositories.
Now, we're stuck with both the "internal branches" (heads) and "external branches" (other repositories) _both_ being confusingly called "branch", and then to make it more confusing, sometimes you'll see people say "head" to make clear that it's a branch internal to one repo.
> In any case, should the cvsimport turn cvs branches into git branches > instead of heads? Is there are way to turn a head into a proper > branch?
They are "proper branches", and sorry about the confusion. A head is a branch.
Linus