d.k
d.k

Reputation: 4460

Code disappears in target branch on git merge w/o any indication

I'm having a problem with Git merge. In short, I'm merging the master branch into a feature branch, essentially git checkout feature && git merge master.

This is how it looks graphically:

other branches            O1 --- O2 --- 0x
                            \      \      \
master                       M1 --- M2 --- M3
                               \             \
                                \             \
                                 \             \
                                  \             \
feature                            F1 --- F2 --- staging
                                          ^           ^
                                          |        same code missing here
                                     code present here

What I cannot understand is that:

Could anyone explain please how this can happen? My intuitive understanding is that if Git removes something it must be reported in the diff at least.

I'm having a feeling that this may have something to do with different merge strategies. But I still can't understand how Git could remove something and not show it in the diff.

Upvotes: 0

Views: 62

Answers (0)

Related Questions