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

> It's exactly the same thing git branches do. If it seems hacky, it's also hacky in git.

I more meant that it seems hacky to add a feature that's mostly-sorta like Git branches to Mercurial now.

> Stick with what original? The originals in mercurial are branches (where the branch name is part of the commit metadata and thus of the repository's history forever, save for history rewriting) and "anonymous heads".

I meant original as in Git vs Mercurial. Like if you want Git-like branches, then why not just stick with Git?

> Erm… you can also clone repositories in git.

Yeah, you could, but I've never seen anybody recommend cloning a Git repo on the same computer for the purpose of separating out work from the main branch. At least for a while, this seemed to be widely recommended way of separating code out in Mercurial.

Where things get kinda weird - in Git, if you want to commit code somewhere that doesn't go into main just yet, there are only 2 options - branches and stash, and stash is explicitly meant to be a very short-term, local thing, since you can't really share them easily and they aren't really part of the commit hierarchy. That makes things simpler, as you never have to wonder what the right feature to use is for keeping separate work somewhere and sharing it with other people. You can create complex structures with branches, but at least there's only one 'type' of thing to keep track of.

I'm not as familiar with Mercurial, but for ways to keep temporary work somewhere, it seems we have named branches, anonymous branches, bookmarks, cloned repos on the same system, and apparently shelve too. According to this guy[1], the workflows for sharing bookmarks around don't seem to be fleshed out all that well either. So how do I know which one to use for what tasks?

[1] http://www.kevinberridge.com/2012/05/hg-bookmarks-made-me-sa...



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

Search: