title: What constitutes a merge conflict in Git?
body: <p>How does git determine that a particular merge has a conflict and what the conflict is?</p>
  
  <p>My guess would go something like this: if the two commits being merged have a common parent commit, and if they have both changed line X from what the parent had, that's a conflict.</p>
  
  <p>What complicates my understanding is:</p>
  
  <ul>
  <li>"Changing line X" can mean replacing it with several new lines, and that's still shown as one conflict (version A has this one line, and version B has these 5 lines, or whatever)</li>
  <li>If you did insert lines in one of the commits, a dumber algorithm would think that <strong>all</strong> subsequent lines had changed: Line 30 now has the former contents of line 25, 31 has the former contents of 26, etc. But git can tell that those are the same, and I don't know how.</li>
  </ul>
  
  <p>Can anybody explain how this works, or point me to a link that does?</p>