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

Maybe I'm missing some nuance in what you're asking for, but in mercurial, you should be able to just create a named branch to get the same effect:

  hg branch bug-fixes
  hg commit -m "creating bug fix branch"
  hg update default
  hg branch translations
  hg commit -m "creating translations branch"
then you can just "hg update <branchname>" to do an in place switching between branches (just like git checkout).

I wouldn't use 2 separate repositories for that, just one.

We've got multiple named branches at work (I also use bookmarks with development branches fairly heavily, but that's a slightly different topic).



Wouldn't these branches be permanent? They might be fine for translations, but I doubt upstream would accept one for a bug fix.

As for bookmarks, if I understand this correctly, I have to convince upstream to use them.

With git I can create a branch in my repository and upstream can pull my changes in whatever branch it wishes too. I don't need to convince anyone to do anything else, besides accepting my patches.


Sorry, I misunderstood your use case for the bug-fix branch. Yes, you likely wouldn't want a named branch for that.

I use local bookmarks for this. It lets you think of it as a branch locally (it's really a floating tag), but doesn't (automatically) get pushed out.




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

Search: