[英]How to merge feature branches into master so that new changes also reflected
I made a feature branch (let's call it branch A) on top of someone else feature branch(let's call it branch B).我在其他功能分支(我们称其为分支 B)之上创建了一个功能分支(我们称其为分支 A)。 Now there were some changes made to branch B and then it was pushed to master.
现在对分支 B 进行了一些更改,然后将其推送到 master。 Those changes were not reflected in branch A in which I was working but now I need to merge branch A in master.
这些更改并未反映在我正在工作的分支 A 中,但现在我需要将分支 A 合并到 master 中。 So if I merge it will Github keep the changes of Branch B or after merging the master branch will be like Branch A ( ie my branch which does not contains Branch B new changes) There are no merge conflicts since I was working on different files.
因此,如果我合并它将 Github 保留分支 B 的更改,或者在合并后主分支将类似于分支 A(即我的分支不包含分支 B 的新更改)因为我正在处理不同的文件,所以没有合并冲突。
In your situation the master
branch will contain both在您的情况下,
master
分支将包含两者
branches A
& B
.分支机构
A
和B
。 And if you have been working on different files如果您一直在处理不同的文件
then there will be no conflicts between the branches.那么分支之间就不会有冲突了。
The best way to keep the tree clean would be to merge B into A and then merge A into master.保持树清洁的最佳方法是将 B 合并到 A 中,然后将 A 合并到 master 中。
But only if the changes in the branch B change the feature in branch A , otherwise merge directly into master ( Look at the answer from @ben-s ).但前提是分支 B 中的更改更改了分支 A 中的功能,否则直接合并到 master 中(查看@ben-s的答案)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.