0

My team uses Eclipse as our IDE and Github as our repository storage for web development. We have a development site and a production site. The production site draws from the "master" branch, and the development site draws from the "develop" branch, which is a branch from "master."

Whenever we make new changes, we create a new branch from "master", do our work, and make a pull request to merge our branch into "develop" for testing. If it passes our tests, we then merge the new branch back into "master."

This occasionally leads to merge conflicts, but resolving those is usually not an issue. This time, however, I'm running into a very strange conflict. After getting a Github merge conflict and then merging the develop branch into my current branch to see the conflicts, the result is that one bracket at the end of the file seems to have been replaced with an identical character:

   }
<<<<<<< HEAD
}
=======
}
>>>>>>> refs/heads/develop

What can I make of this? How can I fix it? I've tried merging my branch into develop locally, and the conflict looks a little different, which is extremely odd to me.

<<<<<<< HEAD
    }
}
=======
    }
>>>>>>> refs/heads/mybranch

Comparison between master and develop shows that develop is ahead of master in commits, and no one else has changed this line in the file for over a year. Any other branches made from master that change this file get the same merge conflict. I've even tried merging in a branch that deletes the file entirely so that I could do another commit that adds the same file back, but I still get the merge conflict.

What else can I try?

kostix
  • 43,267
  • 10
  • 69
  • 137
sadq3377
  • 667
  • 4
  • 13
  • 2
    Possible duplicate of [Why does git show a conflict between two apparently identical added files?](http://stackoverflow.com/questions/9950466/why-does-git-show-a-conflict-between-two-apparently-identical-added-files) – PeeHaa Oct 14 '16 at 14:17

1 Answers1

1

Anytime I see something like this I immediately wonder about whitespace (spaces, new lines, tabs, etc). I'd start there before exploring a fix in Git as my experience with Git is that it seldom makes mistakes in this area but an IDE (or change in IDE) could definitely cause something like this (for example replacing tabs with spaces upon saving a file in your IDE).

Tony Bibbs
  • 36
  • 1