Re: Newbie grief
From: Sitaram Chamarty <hidden>
Date: 2016-06-15 22:53:42
On Tue, May 1, 2012 at 4:44 PM, Ted Ts'o [off-list ref] wrote:
On Tue, May 01, 2012 at 09:14:24AM +0530, Sitaram Chamarty wrote:quoted
quoted
Multiple heads are the idea that a single commit can "branch" in the repository and that both commits can be HEADS of the same branch at once in a single repository. This allows a potential collision to exist in the repository and to be pushed and pulled through multiple repositories. ItThat is bizarre; I have no other word for it. I teach git (occasionally), and if this feature existed I would totally ignore it in my teaching material because I wouldn't know how to defend or explain the need for "hydra branches".I wouldn't use the verb branch (and certainly not "hydra branch"),
I coined that phrase for what was described as "[multiple] HEADS of the same branch at once in a single repository".
it this way, it becomes obvious that a particular parent commit can have multiple child commits. (This seems to be what you are calling "hydra branches".)
No. In git, the multiple child commits you mention are all either different branches, tags, or they are detached/subject to GC. At no time do you actually have the situation he was talking about: a single branch representing more than one leaf (no children) commit *at the same time*.
Git differs in that you can have a child commit which is not pointed to by a branch pointer, and which is referred to only by commit-id. These child commits can disappear on you, when you do a garbage collection; but it allows you to have multiple child commits hanging off of a single parent commit, and you can do diffs, cherry picks, etc. But they *do* have a unique name --- the commit id, which is a SHA1 hash of the contents of the diff.
Sure. What the original poster wants is that all these unnamed commits be magically associated with the branch they were born in, and be propagated via pushes and pulls. As I understand it, he would like a one -> many relationship between branch name and SHA.