git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Junio C HamanoNext: Martin Langhoff
Message 3 of 16 in “Switching heads and head vs branch after CVS import”
  1. Martin LanghoffAug 15, 2005
  2. Junio C HamanoAug 15, 2005
  3. Linus TorvaldsAug 15, 2005
  4. Martin LanghoffAug 15, 2005
  5. Linus TorvaldsAug 15, 2005
  6. Sven VerdoolaegeAug 15, 2005
  7. Matthias UrlichsAug 15, 2005
  8. Martin LanghoffAug 15, 2005
  9. Wolfgang DenkAug 15, 2005
  10. Matthias UrlichsAug 15, 2005
  11. Sven VerdoolaegeAug 15, 2005
  12. Linus TorvaldsAug 15, 2005
  13. Martin LanghoffAug 15, 2005
  14. Wolfgang DenkAug 15, 2005
  15. Linus TorvaldsAug 15, 2005
  16. Johannes SchindelinAug 15, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.