title: How to reparent in Git
body: <p>What non-interactive Git command(s) achieve the change from <em>Before</em> to <em>After</em> in each case?</p>
  <p><strong>1a. Reparenting I</strong></p>
  <p>Before:</p>
  <pre><code>A---B---C---D
  </code></pre>
  <p>After:</p>
  <pre><code>  C'---D'
   /
  A---B
  </code></pre>
  <p><strong>1b. Reparenting II</strong></p>
  <p>Before:</p>
  <pre><code>  C---D
   /
  A---B
  </code></pre>
  <p>After:</p>
  <pre><code>  C
   /
  A---B---D'
  </code></pre>
  <p><strong>1c. Reparenting III</strong></p>
  <p>Before:</p>
  <pre><code>  C
   /
  A---B---D
  </code></pre>
  <p>After:</p>
  <pre><code>  C---B'---D'
   /
  A
  </code></pre>