当具有子功能的功能时,将功能分支重新定位到开发
Rebase feature branch onto develop when feature with subfeature
我正在处理一个功能分支。
d1 -- d2 -- d3 -- d4 -- d5 -- d6 -- d7 -- d8 <- develop
|
\ -- f1 -- -- -- -- -- f2 -- f3 -- -- -- -- -- f4 -- <- feature
| | | |
\ -- s1 -- s2 -- / \ -- x1 -- x2 -- /
我想变基功能以使用子功能 s1 进行开发,如下所示:
...etc,.-- d7 -- d8 <- develop
|
\ -- f1 -- -- -- -- -- f2 -- f3 -- -- -- -- -- f4 -- <- feature
| | | |
\ -- s1 -- s2 -- / \ -- x1 -- x2 -- /
哪个命令产生了预期的结果?
(feature)$ git rebase develop
我尝试git rebase develop,但是功能和子功能分支变成了一条线:
...etc,.-- d7 -- d8 <- develop
|
\ -- f1 -- s1 -- s2 -- f2 -- f3 -- x1 -- x2 -- f4 -- <- feature
尝试git rebase --preserve-merges develop
我正在处理一个功能分支。
d1 -- d2 -- d3 -- d4 -- d5 -- d6 -- d7 -- d8 <- develop
|
\ -- f1 -- -- -- -- -- f2 -- f3 -- -- -- -- -- f4 -- <- feature
| | | |
\ -- s1 -- s2 -- / \ -- x1 -- x2 -- /
我想变基功能以使用子功能 s1 进行开发,如下所示:
...etc,.-- d7 -- d8 <- develop
|
\ -- f1 -- -- -- -- -- f2 -- f3 -- -- -- -- -- f4 -- <- feature
| | | |
\ -- s1 -- s2 -- / \ -- x1 -- x2 -- /
哪个命令产生了预期的结果?
(feature)$ git rebase develop
我尝试git rebase develop,但是功能和子功能分支变成了一条线:
...etc,.-- d7 -- d8 <- develop
|
\ -- f1 -- s1 -- s2 -- f2 -- f3 -- x1 -- x2 -- f4 -- <- feature
尝试git rebase --preserve-merges develop