From: Tim Chase <git@tim.thechases.com>
To: Git Mailing List <git@vger.kernel.org>
Subject: Re: coming from git, understanding mercurial branching
Date: Fri, 6 Sep 2013 08:26:21 -0500 [thread overview]
Message-ID: <20130906082621.01162905@bigbox.christie.dr> (raw)
In-Reply-To: <CALUzUxoa7Lw-_sj3LRj-9=hSh17hi+j4JhfAPKaDfhuE8PnKCA@mail.gmail.com>
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.
-tkc
next prev parent reply other threads:[~2013-09-06 13:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-06 2:27 coming from git, understanding mercurial branching Tim Chase
2013-09-06 4:39 ` Tay Ray Chuan
2013-09-06 13:26 ` Tim Chase [this message]
2013-09-06 13:51 ` Konstantin Khomoutov
2013-09-06 16:40 ` Philip Oakley
2013-09-06 19:29 ` Tim Chase
2013-09-08 0:42 ` Felipe Contreras
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130906082621.01162905@bigbox.christie.dr \
--to=git@tim.thechases.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).