Complex merge script in Git

I was asked if the following is possible in Git, and I know this:

Given the following scenario:

  • I create a new branch "cool function" from the trunk and do some work in it.
  • I am doing another “fancy-enhancement” branch from the “cool-feature” and doing some work on it.

Is it possible that I will get the difference between a cool feature and an improvement in imagination and I will convey only what is connected with the trunk? So, is there any material left to add for the cool function?

MASTER
   \
    cool-feature
     \
     fancy-enhancement

It seems to me that this should be possible, but I'm not sure how to get the difference between the two branches.

+3
source share
1 answer

"git diff branch1..branch2", diff, , "git log branch1..branch2", , .

, , , rebase. diff log, , ( diff, ).

, , , ,

+5

Source: https://habr.com/ru/post/1789952/


All Articles