News for hackers. Stuff that matters.
Re:Mercurial over Git by drewcrawford on Friday April 16, 2010 @05:06PM (#1271938)
To a lot of the people who prefer Hg to Git, I ask this question: What's the proper way to do a feature branch in Hg? (serious question) The three answers I've heard are:

* Use hg branch <branchname> like git. The problem is this always requires me to do a push -f, which doesn't feel right...

* Use clone. Really? For a feature branch?

* Use the LocalBranches extension. Really, feature branches (the #1 productivity gain since switching to DVCS) isn't in the core code?

I have yet to find an equivalent to what I consider a core git workflow.

Re:Mercurial over Git by stevelosh on Friday April 16, 2010 @05:13PM (#1271954)
You could use bookmarks if it's just going to be a local branch that only you work on, and you don't want anyone else to see the branch name.

I'd probably use a named branch. Yes, you have to use push -f the first time you push that branch to a remote repo, but I think of that as a "hey, do you really want other people to see this work-in-progress branch?" safeguard.

Re:Mercurial over Git by j_baker on Friday April 16, 2010 @05:33PM (#1271992)
Hg allows local branches natively, but it tends to prefer pushing from repository to repository rather than from local branch to local branch. So you can do it either way 1 or 2 (whatever suits you). It sounds like #3 might be based on outdated information.
Re:Mercurial over Git by reiddraper on Friday April 16, 2010 @05:18PM (#1271965)
push -f is what I use, "force" makes it sound more sinister than it is.
Re:Mercurial over Git by samps on Friday April 16, 2010 @05:35PM (#1271994)
push -f is the thing. Requiring -f just makes you think twice before accidentally exposing the rest of the world to your changes without merging them.