title: Using git to merge a child branch
body: <p>I have a folder managed with git. The <code>develop</code> branch is the central development branched used and has the following commit history:</p>
  <blockquote>
  <p>A -- B -- C -- D</p>
  </blockquote>
  <p>A patch is released by the vendor that updates the baseline state of the files in the folder. The files have been significantly customised in <code>develop</code>, but I still need to check what changes the vendor have made. I want to attempt to merge the vendors files into my <code>develop</code> branch, so that I can easily view the differences and resolve any merge conflicts etc.</p>
  <p>I have tried the following:</p>
  <ul>
  <li>Create a <code>patch_v1</code> branch from <code>develop</code>.</li>
  <li>Delete the folder contents in <code>patch_v1</code> and replace with the vendor patched files.</li>
  <li>Commit the changes. <code>patch_v1</code> now looks like:</li>
  </ul>
  <blockquote>
  <pre><code>                 E
                  /
  A -- B -- C -- D
  </code></pre>
  </blockquote>
  <ul>
  <li>Create a <code>patch_merge</code> branch also from <code>develop</code>.</li>
  <li>Attempt to merge <code>patch_v1</code> into <code>patch_merge</code>.</li>
  </ul>
  <p>At this stage I receive an error that <code>patch_v1</code> is already up-to-date. From what I have read, this is because <code>patch_v1</code> has <code>patch_merge</code> as a parent.</p>
  <p>I feel like I am doing something fundamentally wrong here and not using git correctly.</p>
  <p>What is the correct way to achieve what I am trying to do?</p>
  <p><strong>Edit:</strong> I was able to achieve the desired behaviour by creating patch_v1 as an orphan branch and then merging develop in while allowing unrelated histories:</p>
  <ul>
  <li>git checkout --orphan patch_v1</li>
  <li>Apply the patch patch_v1 and commit</li>
  <li>git merge --allow-unrelated-histories develop</li>
  </ul>