How can I back out a merge in Mercurial and later remerge with that branch?

前端 未结 6 802
误落风尘
误落风尘 2021-01-30 10:33

I have two branches, default and branch1. By mistake one person in our team merged branch1 with default. The content in branch1 is not yet ready to merge with default (it contai

6条回答
  •  别那么骄傲
    2021-01-30 11:13

    This answer assumes that you have already pushed

    This would result in (at least one) unresolved head, depending on what you just forgot. More depending on who just pushed from what branch.

    I love HG and use it avidly, but their idea of a branch can drive someone batty when coupled with a history that is (by design) intentionally immutable.

    I usually clone a backup (locally) of the repo prior to doing a branch merge, for just this reason. I always check before pulling.

    Eric Raymond is working on something that is more or less DVCS agnostic that can (hopefully) help in situations just like the oops you described, but I don't think he's going to have HG support fully implemented for another week or two. Still, it might be worth watching.

    But, only useful if nobody has pulled the 'ooopsie' tip.

提交回复
热议问题