How can I "split the branch further" in the mercurial?

Admittedly, a misleading headline, but I did not know how to do it better.

Thus, I made a mistake by clicking on all my specific changes in the project before I opened the branch. Thus, in the default branch there are several changes that do not belong there. They should be in my recently opened branch.

Do I need to undo all the changes first and then forward them to the correct branch again? Does it even work?

Thank you for your help.

+3
source share
1 answer

EditingHistory (, , , , " " ), . , "" , , .

, :

[R0] -> [R1] -> [R2] -> [R3]

R2 R3 , , , , . R4, R2 R3. , , , , , "revert".

hg update tip ; hg revert --all -r R2 ; hg commit -m 'undid changes R2 and R3'

:

[R0] -> [R1] -> [R2] -> [R3] -> [R4]

, , ​​:

[R0] -> [R1] -> [R2] -> [R3] -> [R4] -> [R5] -> [R7]
                                   \
                                    --> [R6] -> [R8]

R6 R8 " " . , R0-R5 R7, :

hg push -r R7

, , R6 R8 R7, , .

+6

Source: https://habr.com/ru/post/1750955/


All Articles