deleting a named branch

Dirkjan Ochtman dirkjan at ochtman.nl
Mon Jun 9 07:41:54 CDT 2008


Theodore Tso <tytso <at> mit.edu> writes:
> You can use "hg strip" to get rid of named branches, but I believe git
> is much more optimized for a development workflow that uses lots of
> short-lived branches.  Hence, if project developers like to use lots
> of short-lived "topic branches" as part of their development
> methodology, git is going to be much a better choice for them.

You really don't want to use hg strip to get rid of named branches, as that will
also remove changesets you might have merged into mainline (and the merge)! Just
add the --active option to the defaults section option for branches.

Our named branches support is more real, in the sense that it annotates a
changeset with information about which branch it was committed to. In git, on
the other hand, a branch is only a high-level name about some sequence of
changesets which you happen to care about. When you "remove" the branch (name),
the changesets are still there, but the context within you made them is not.
Some may like that, but hg doesn't allow you to remove things like that.

Cheers,

Dirkjan



More information about the Mercurial mailing list