Discard a local branch in Mercurial before it is pushed

前端 未结 3 1135
南旧
南旧 2020-12-15 17:43

Many times it happens that I have few commits on my local Hg repository which I don\'t want to push and sometimes I want to remove the local branch altogether. But I cannot

3条回答
  •  遥遥无期
    2020-12-15 18:27

    I know its too late but it may be useful for any one:

    If your branch is not pushed yet.

    • First rollback changes hg rollback only if you have done commit but not yet pushed
    • Second run hg update --clean
    • Third run hg branch any-existing-branch
    • Fourth run hg pull -u

提交回复
热议问题