Thread (7 messages) flat view 7 messages, 4 authors, 2016-06-15

Re: Switching heads and head vs branch after CVS import

From: Linus Torvalds <torvalds@osdl.org>
Date: 2016-06-15 22:42:04


On Mon, 15 Aug 2005, Martin Langhoff wrote:
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help