How to merge feature branches into master so that new changes also reflected

Viewed 98

I made a feature branch (let's call it branch A) on top of someone else feature branch(let's call it branch B). Now there were some changes made to branch B and then it was pushed to master. Those changes were not reflected in branch A in which I was working but now I need to merge branch A in 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 ( i.e. my branch which does not contains Branch B new changes) There are no merge conflicts since I was working on different files.

2 Answers

In your situation the master branch will contain both

branches 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.

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).

Related