Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I don't really see much value in keeping a branch around after development is complete (or defunct).

If the work is complete then merge it (with no-ff if you want to show the merge explicitly). If it's defunct then delete it. If you want to keep it around but discourage further development then tag it or come up with a naming convention.

That you have the ability to mark branches as closed in mercurial is mainly paper over their odd decision to not allow deletion of branches.



I don't really see much value in keeping a branch around after development is complete (or defunct).

If you have both branches and a way to close them, then you have a much simpler way to get a feel for the history of the code. You know at a quick glance what sort of major work has gone on and what's still ongoing.

If you don't have that you'll end up inventing more complex ad-hoc schemes to get it (merging a branch, deleting it and tagging the merge commit is an example of one such scheme, and it doesn't do the same thing).

And the ability to mark branches as closed in Mercurial is, to me, an indication that the developers put some thought into the different use cases for branching and wanted to cover more of them than git's standard workflow does ;)


Actually, git supports more workflows, you could simply implement read-only branches with a naming scheme and a hook.

In lots of ways git is a superset, branch workflow included.


git is a superset

A superset which doesn't include everything that's in the alleged subset? That must be a new definition of "superset" that I haven't heard of yet...


The possible workflows with git encompass hg workflows. You're obviously not interested in gaining anything but self-fulfillment throughout this thread.


"Git standard workflow"? Where'd you get that notion from? Supposing there is one, care to share?


Where'd you get that notion from?

From the documentation and from the fact that pretty much every git user who's responded has told me the same things. Or am I supposed to take that as a massive coincidence?


You didn't specify your sample size and I won't vouch for what people I don't know tell you. You can take it as whatever you'd like. Next you'll be saying the Django tutorial is the standard way to lay out projects. It's in the documentation, right?


Well, of the people who decided to provide answers on HN or reddit, the consensus was: merge the branch, delete it, then add a tag on the merge commit. And then on IRC the author of this book told me to do the same thing:

http://pragprog.com/titles/tsgit/pragmatic-version-control-u...

The only person who suggested anything else, out of fifty-seven comments so far, was one who suggested merging the branch and then keeping it around rather than deleting and tagging it.

Since that's all I have to go on, and since it seems to be a pretty clear consensus, I'm taking their advice as being a generally-accepted convention amongst git users. Granted, such conventions in git seem to be as ephemeral as branches (e.g., fads such as "rebase everything! rebase after every commit! No, wait, never rebase! Rebasing is evil! Nobody should rebase!"), but if you're trying to suggest that as a result there are no conventions, I'm just going to write you off.


Conventions are just conventions anyway. We've established that there's no technical barrier to your two objections. 1) You can clone different branches into different paths, which is exactly like a traditional svn workflow, and a pretty normal thing to do for continuous integrations and the like. 2) And if you never want to delete a branch, you can check on their merged status to determine if they're "done". More clever solutions have been supplied by others in this thread. You needn't convert to git, but it'd be polite to recognize that your objection to git is purely psychological.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: