I know this question's a bit stale, but it's relevant to me at the moment. As @ErikEJ mentioned in a comment, you should probably look at migrating to EF Code First (or something along those lines).
That being said, we're having the same issue you've mentioned above. After a bit of research, it appears that the issue (also happens occasionally w/ .csproj files) is a known issue w/ Git's merge driver that apparently hasn't warranted any kind of attention.
It definitely warrant's more hands-on than i'd like, especially for such an unwieldy file. We've gotten away w/ rebuilding the model, however you definitely have to review the results of the change to ensure you didn't lose anything.
Also, {insert shameless plug for keeping your changesets as small as possible}
Edit: Here's some further reading: https://haacked.com/archive/2014/04/16/csproj-merge-conflicts/ if you're interested.
Edit: I've had some luck using the "patience" diff algorithm for doing the merges. it definitely cleans things up with merging XML. It's still not pretty or awesome, but you may want to give it a shot.
From Git merge using recursive strategy and patience option, you can call
git merge -s recursive -X patience other-branch
to execute the merge using the patience algorithm. or you can simply do a diff with the --patience
flag.
Finally, you may wish to do some additional reading on the patience algorithm or compare the output of merge conflicts yourself. I've found that I like it better overall and have added it to my global .gitconfig.
Here's some more outside reading if you're interested.
The patience diff algorithm (external)
TIL: Diffing with Patience (external)
Git Source Code Review: Diff Algorithms (external) - includes links to more info from the author of the Patience algorithm, but my corporate proxy is currently blocking me from going there, so I haven't read them yet.