I am currently struggling with a git issue I have just had. That is the scenario:
I have two branches A and B that I merged with:
git checkout A
git merge B
The merge resulted in some conflicts with files and some merged properly automatically:
Auto-merging: file1.txt
Auto-merging: file2.txt
CONFLICT (content): Merge conflict in file2.txt
I fixed the conflict easily, but the problem came because there is a third file (file3.txt) which didn't show up in the list of files when merging. If I do in the command line
git show --name-only <commit>
the file file3.txt does not show up, but if I show the git history in IntelliJ IDEA, it says that the file has 2 more commits, but the HEAD is currently in the third one, so the more recent commits are currently lost.
I don't know what really happened, but the two last commits (a normal one and a merge commit) are currently missing.
Can anybody explain why is that happening and what am I doing wrong?