1

I want to ask a question about Hg.

enter image description here

You can see the picture that there is a branch from 196 to 199, and now I want to remove the branch in the server version and use the 195 as the newest version, could you please tell me how to do that?

Thank you so much!

Jeffery You
  • 109
  • 2
  • 2
  • 11

1 Answers1

0

If 196:199 was already pushed to remote, you can't delete this branch (check hg out or phases of these revisions)

If 196:199 are pure local, you can just simply hg strip not needed anymore anonymous branch

Anyway, you can:

  1. Dummy merge r199 into r195 and continue work
  2. Forget about branch, and continue your work from 195 (first push with new child-commit of 195 will require -f due to new head in branch)
Lazy Badger
  • 94,711
  • 9
  • 78
  • 110
  • This seems so clearly a duplicate (many potential candidates IMO) – StayOnTarget Mar 27 '20 at 19:39
  • Thank you so much. I did it by a workaround, first, revert to some previous stable version, edit some file and forcely push the changes to the server to cover the backout version. – Jeffery You Mar 28 '20 at 09:43