Git merging text files with content including merge conflict syntax
<p>When merging two complete different files, git changes the file to something like below to show that there are conflicts between the files:</p>

<pre><code>&lt;&lt;&lt;&lt;&lt;&lt;&lt; HEAD
[fileA's content]
=======
[fileB's content]
&gt;&gt;&gt;&gt;&gt;&gt;&gt; newbranch
</code></pre>

<p>And I'm thinking that if I change the <code>fileA's content</code> with fake syntaxes:</p>

<pre><code>text1
=======
text2
&gt;&gt;&gt;&gt;&gt;&gt;&gt; newbranch
text3
&lt;&lt;&lt;&lt;&lt;&lt;&lt; HEAD
text4
</code></pre>

<p>When trying to merge, the conflict file will be like:</p>

<pre><code>&lt;&lt;&lt;&lt;&lt;&lt;&lt; HEAD
text1
=======
text2
&gt;&gt;&gt;&gt;&gt;&gt;&gt; newbranch
text3
&lt;&lt;&lt;&lt;&lt;&lt;&lt; HEAD
text4
=======
[fileB's content]
&gt;&gt;&gt;&gt;&gt;&gt;&gt; newbranch
</code></pre>

<p><strong>Question</strong></p>

<p>How does git know which of the syntaxes are real or fake? Or the content above simply breaks the merging process?</p>