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

Re: coming from git, understanding mercurial branching

From
Tay Ray Chuan <rctay89@gmail.com>
Date
Sep 6, 2013, 04:39 UTC
Message-ID
<CALUzUxoa7Lw-_sj3LRj-9=hSh17hi+j4JhfAPKaDfhuE8PnKCA@mail.gmail.com>
In-Reply-To
<20130905212714.636db4c4@bigbox.christie.dr>
On Fri, Sep 6, 2013 at 10:27 AM, Tim Chase <git@tim.thechases.com> wrote:
Show 5 quoted lines
> I've got a pretty good grasp on git's rather straightforward
> branching, but am trying to wrap my head around Mercurial's
> branching.  There seem to be several flavors, some default to
> push-public, while others are private; some are tracked in history,
> while others seem more ephemeral;
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!
> often the docs suggest cloning
> instead of branching; detached heads seem more normal in the
> Mercurial world.
Are you referring to this?
  $ hg clone https://... master
  $ cd master
  # hack...
  $ cd ..
  $ hg clone https://... fix1
  $ 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.

-- 
Cheers,
Ray Chuan
Previous: Tim ChaseNext: Tim Chase
Message 2 of 7 in “coming from git, understanding mercurial branching”
  1. Tim ChaseSep 6, 2013
  2. Tay Ray ChuanSep 6, 2013
  3. Tim ChaseSep 6, 2013
  4. Konstantin KhomoutovSep 6, 2013
  5. Philip OakleySep 6, 2013
  6. Tim ChaseSep 6, 2013
  7. Felipe ContrerasSep 8, 2013

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.