Re: Newbie grief

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Rich Pixley <rich.pixley@xxxxxxxx> writes:

>> Git tracks your version of master separately from each other remote's
>> master.  This is exactly dual/multiple heads.
>
> No, it isn't at all.
>
> 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.

I think your "not at all" thinking is a bit tainted by your knowing very
well how Hg does things, but I do not think there is much fundamental
difference between what we do.  Git just tends to be a bit more explicit
and encourages users to be also be more explicit.

When you integrate from the other side (say, "origin") by pulling, instead
of splitting the 'master' branch into two (i.e. ours and origin's), we
store what came from the origin in remotes/origin/master and let the user
merge it into his heads/master.  Essentially, the same name 'master' is
split into two, between remotes/origin/ and heads/ namespace.  We are just
more explicitly about the split.

Similarly, when pushing, you could follow the same model by pushing your
change into remotes/pixley/master, instead of pushing directly to the
"master" branch, i.e. heads/master, and then merge the former to the
latter after push succeeds.

Needless to say, you do not have to limit the splitting just to two.
Since everything is named, you can tell where each 'master' came from by
looking at the namespace (obviously this requires people to establish and
follow the naming convention).
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Newbies FAQ]     [Linux Kernel Development]     [Free Online Dating]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Free Online Dating]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]     [Linux Resources]

Add to Google