title: Why does git interpret sql files as binaries during a merge conflict?
body: <p>I got the problem with resolving merge conflicts within sql files. </p>
  
  <pre><code>MenkeTTA@909086 MINGW64 //FILE0019 (master)
  $ git pull
  remote: Microsoft (R) Visual Studio (R) Team Services
  remote: Found 5 objects to send. (5 ms)
  Unpacking objects: 100% (5/5), done.
  From https://***
  d58a69b..4830c58  master     -&gt; origin/master
  warning: Cannot merge binary files: example_StoredProcedure.sql (HEAD vs.    4830c5886d3e1eac5ac76d1d49496afb43f444c3)
  Auto-merging WRR - example_StoredProcedure.sql
  CONFLICT (content): Merge conflict in example_StoredProcedure.sql 
  Automatic merge failed; fix conflicts and then commit the result.
  </code></pre>
  
  <p>When the merge conflict is created git isn't creating a pre-merged file with the competing changes as in the usual structure: </p>
  
  <p>/SQL-File/</p>
  
  <pre><code>&lt;&lt;&lt;&lt;&lt;&lt;&lt; HEAD
  competing change A
  =======
  competing change B
  &gt;&gt;&gt;&gt;&gt;&gt;&gt; branch-a
  </code></pre>
  
  <p>Git is treating both files as binaries – but only for the merge-conflict operations (normal merge without conflict works properly). I can choose my own version of the file or the pulled competing file from the remote as the new head for the next push.</p>
  
  <p>I reproduced this conflict with a normal .txt file. Git is treating the merge conflict then as expected with creating one pre-merged file with both competing changes/commits where I can manually fix the code how I want to.</p>
  
  <p>To make git recognize the sql files as text I added </p>
  
  <pre><code>.sql diff
  </code></pre>
  
  <p>to the .gitattributes file like it's described <a href="https://stackoverflow.com/questions/28145687/why-does-git-think-my-sql-file-is-a-binary-file">here</a>. Does anyone know how I can make git to create a ordinary pre-merged file with both versions of the competing commits when working with sql files?</p>