Home > other >  Does merging a branch into both A and B, then merging B into A create issues?
Does merging a branch into both A and B, then merging B into A create issues?

Time:01-28

I have a branch that holds a few small changes, which we merged into the Development branch a couple days ago. Now, we wanted to bring those changes to Master, but we're worried this will become a problem when we merge Development into Master. Can this yield any problems?

To illustrate:

  1. Merge A into Dev
  2. Merge D, E, F into Dev
  3. Merge A into Master
  4. Merge Dev into Master

Can something go wrong?

CodePudding user response:

According to me, you might get conflicts, which you would have to resolve. Apart from that there shouldn't really be any issues.

If you're question's related to basic git merging, then the merging section of this video could be helpful: https://www.youtube.com/watch?v=jG4Vs81kMlc&t=1028s

However, creating a backup is always recommended before trying it out.

CodePudding user response:

I've tested a bunch of times with different changes, as long as I don't have any conflicts it seems to work fine... git figures that those changes came from branch A, and doesn't seem to try to re-do them.

As far as I could tell, this works fine

CodePudding user response:

Git is well done, if while performing the merge you have any conflicts, git will tell you. you can always type the command git merge --abort to abort the current merge if something goes wrong or type git reset <previous commit hash> to roll back.

  •  Tags:  
  • Related