Steps to reproduce the situation 1. Create file test.txt in your git master with content
A
B
C
and commit it.
- Create new branch test-v1
In master branch remove line B, so you have just
A C
Cherry-pick commit from step 3 to test-v1
Checkout branch test-v1 and add B line again and commit
A B C
Checkout master branch
- git merge test-v1
What I expected to get:
A
B
C
What I got:
A
C
Question: Why is B auto-resolved and not marked as merge conflict when merging?
I tried different merge strategies (git merge --strategy), but I did not find any where I would get the expected result. The only way was to git rebase test-v1 on master. But I suppose in more complicated setup, it could rewrite history of master, right?