How to remove accidental branch in TortoiseHg?

后端 未结 5 1520
再見小時候
再見小時候 2021-02-12 10:06

(I am a relative newcomer to TortoiseHg, so bear with me :-) I use TortoiseHg on two machines to talk to my remote source repository. I made changes on one machine, committed th

5条回答
  •  盖世英雄少女心
    2021-02-12 10:36

    In the Repository explorer, choose the first rev of your local changes, then right click on the tip of the branch you just pulled and choose "Rebase on top of selected" or "Modify history->Rebase on top of selected" depending upon your client version. This will "re-base" your revs on the pulled ones.

    Additionally, to help avoid it in the future...

    In Repository Explorer, choose Tools->Settings. In the top left drop-down, choose "User global settings", so this applies to all repositories. Then choose Synchronize on the left. In "After Pull Operation" choose "rebase". This will cause your local revisions to be "rebased" upon the revisions you just pulled, rather than leaving them in a different branch.

    This is how I do it and is probably what you typically want.

    For more info, see the rebase project and the rebase extension.

提交回复
热议问题