On 2013-09-06 12:39, Tay Ray Chuan wrote:
> First: recognize Mercurial's branches are entirely different beasts
> from Git's. They just happen to be given a same sequence of
> characters, b-r-a-n-c-h. The similarities end there!

Yeah, I'm trying to create a mental map between what Git means by
branching, and what Mercurial means by branching.  As you say, they
seem to be entirely different beasts.

> > often the docs suggest cloning instead of branching;
> Are you referring to this?
>   $ hg clone https://... master
>   $ cd master
>   # hack...
>   $ cd ..
>   $ hg clone https://... fix1

Usually I see this written as

  $ cd ..
  $ hg clone master fix1

but otherwise, yes.

>   $ cd fix1
>   # hack...
>   $ cd../master
>   $ hg pull ../fix1
>   $ hg merge ...
> In git, you would have your master branch, checkout -b fix1, then
> merge them back to master when you're done. The above describes how
> one would do this in mercurial.

Mercurial has this cloning-branch thing, a "branch" command, and
something called "bookmarks" which all seem to have different
behaviors (and corresponding reasons to choose them) and yet all be
loosely referred to as "branching".  Cloning litters the drive with
duplicate checkouts (even if they use hard-linking for the repo
behind the scenes, there's still a lot of time spent writing.  The
git equiv of this hg suite would be almost identical, cloning a
local checkout); the 2nd and 3rd are more branch-related and what I'm
trying to grok.


To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to