I have two branches version-1.0
and version-2.0
, their common ancestor is commit C
.
I try to merge the two branch and it shows a file a.txt
conflicted.
for example:
$ git checkout version-2.0
$ git merge version-1.0
$ git status
Unmerged paths:
(use "git add/rm <file>..." as appropriate to mark resolution)
deleted by them: a.txt
$ git ls-files -u | grep a.txt
100644 xxxxxxxxxxxxxxxxxx 1 a.txt
100644 yyyyyyyyyyyyyyyyyy 2 a.txt
$ git --version # The git enviroment
git version 2.34.1.windows.1
I get common ancestor commit C
from this command: git merge-base version-1.0 version-2.0
.
But git diff --stat C version-1.0
didn't show any change of a.txt
file.
How does Git make this file conflicted?
How to get more details when Git Merge two branch?
Thanks for your answer!