0

In a new branch I've created a new file (File A) and have written some code on it.

Merging to the development branch I get a merge conflict in an old file, File B. Running git diff against it I see that File B is overwritten by the same changes I have done on File A.

Would anyone know why this is and how I could fix it?

Note that I have not worked on File B on this new branch and that File A seems to be deleted by the merge.

MeltingDog
  • 12,714
  • 38
  • 143
  • 270

1 Answers1

1

Try adding -Xno-renames to your git merge command, to see if this is a case where Git believes FileB is a renaming of FileA (because of a similar content)

git merge -Xno-renames development

Or (Git 2.18+, Q2 2018):

git -c merge.renames=false development
VonC
  • 1,129,465
  • 480
  • 4,036
  • 4,755