多个分支之间不共享/相互的提交会发生什么情况,并且您对其中一个分支进行变基?
看起来像这样
M1 -- M2 -- M3 -- ..................... -- M70
\ /
(branch P) P1 -- P2 -- P3 -- P4 -- P5 /(branch rebase on M70)
\(tag and branch) /
(branch C) C1 -- C2 -- C3 -- C4
我的git结构在上图中 ,我的git结构具有m
,因为不同人在主分支中推动的更改。 分支P
和分支C
是我的分支和代码更改。
我从p1到p5
工作。后来,我意识到需要在提交p3
之上有分支从Commmits C1到C4
工作。现在,我想重新考虑并在将来合并p1,p2,p3,c1,c2,c3,c4
提交。由于CONDITS P1,P2,P3
在两个分支中共享分支P
会发生什么,因为这些共享委员会将在M70上重新固定(我猜)? 分支p
保留共享提交的副本,还是将提交p4
和p5
成为孤儿?
我有可能在以后的分支p
上进行工作,并在完成分支C
完成时合并。
注意 - 我尚未在M70上进行C4的重新启动。
My git structure looks like this
M1 -- M2 -- M3 -- ..................... -- M70
\ /
(branch P) P1 -- P2 -- P3 -- P4 -- P5 /(branch rebase on M70)
\(tag and branch) /
(branch C) C1 -- C2 -- C3 -- C4
In the above diagram, I have M
as pushed changes in master branch by different people. Branch P
and branch C
are my branches and code changes.
I worked from P1 to P5
. Later I realized a need of branch on top of commit P3
, so I tagged the commit P3
and created a branch on top of the tag and worked from commmits C1 to C4
. Now I want to rebase and in future merge P1, P2, P3, C1, C2, C3, C4
commits. Since commits P1, P2, P3
are shared in both branches what will happen to branch P
as these shared commits will be rebased on M70 (I guess)? Will branch P
retain a copy of the shared commits or will commits P4
and P5
become orphaned?
There is a possibility that I want to in future work on branch P
and merge that to master when work on branch C
is complete.
Note - I haven't done the rebase of C4 on M70 yet.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
重新安排大师的C不会影响分支P。
Rebasing C on Master will not impact Branch P.