How to move some changeset to a new branch in mercurial

后端 未结 4 1646
暗喜
暗喜 2020-12-12 19:13

I want to move a changeset from one branch to another. Basically, I currently have:

A -> B -> C -> D # default branch

And I want:<

4条回答
  •  隐瞒了意图╮
    2020-12-12 19:42

    One way is to export a patch for B,C,D; update to A; branch; apply patch:

    hg export -o patch B C D
    hg update A
    hg branch branchname
    hg import patch
    

    To remove B,C,D from the default branch, use the mq extension's strip command.

提交回复
热议问题