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

Re: What are branches?

From
Dmitry Potapov <dpotapov@gmail.com>
Date
Apr 20, 2009, 18:47 UTC
Message-ID
<20090420184746.GG25059@dpotapov.dyndns.org>
In-Reply-To
<alpine.DEB.1.00.0904201621290.6771@intel-tinevez-2-302>
On Mon, Apr 20, 2009 at 04:25:38PM +0200, Johannes Schindelin wrote:
Show 7 quoted lines
> 
> On Mon, 20 Apr 2009, Dmitry Potapov wrote:
> 
> > When you create a new commit, it is always belong to _one_ branch and 
> > never to two or more branches.
> 
> Certainly you forgot about detached HEADs?

I suppose it is a branch without any name given to it, but it is an advanced feature. I don't think many beginners know about it, so it is something that can confuse beginners.

> And about the ability to 
> create new branches which point to the _exact_ same commit as other 
> branches?

In essence, we mark the starting point of the branch. Obviously, it points to a commit that is on other branch or branches. Not every VCS creates a commit when a new branch is created, though overhead of creating of a new branch in other VCSes is usually much larger.

> And about the option to delete the original branch, not 
> removing the commit, or the other branches, at all?

Again, there is nothing unique about it. If I remember correctly, it is so in CVS too. You could remove branch name, but it was still available by ID.

Dmitry
Previous: Björn SteinbrinkNext: Johannes Schindelin
Message 21 of 28 in “What are branches?”
  1. Johannes SchindelinApr 19, 2009
  2. Michael WittenApr 19, 2009
  3. Tuncer AyazApr 19, 2009
  4. Johannes SchindelinApr 19, 2009
  5. Tuncer AyazApr 19, 2009
  6. Dmitry PotapovApr 20, 2009
  7. Michael J GruberApr 20, 2009
  8. Dmitry PotapovApr 20, 2009
  9. Michael J GruberApr 20, 2009
  10. Dmitry PotapovApr 20, 2009
  11. Junio C HamanoApr 20, 2009
  12. Marius VollmerApr 20, 2009
  13. Junio C HamanoApr 21, 2009
  14. Dmitry PotapovApr 21, 2009
  15. Johannes SchindelinApr 20, 2009
  16. Björn SteinbrinkApr 20, 2009
  17. Jakub NarebskiApr 20, 2009
  18. Björn SteinbrinkApr 20, 2009
  19. Jakub NarebskiApr 24, 2009
  20. Björn SteinbrinkApr 24, 2009
  21. Dmitry PotapovApr 20, 2009
  22. Johannes SchindelinApr 20, 2009
  23. Michał KiedrowiczApr 20, 2009
  24. Dmitry PotapovApr 20, 2009
  25. Björn SteinbrinkApr 20, 2009
  26. Brian GernhardtApr 20, 2009
  27. Felipe ContrerasApr 25, 2009
  28. Michael J GruberApr 20, 2009

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.