title: How do I swap the order of two parents of a Git commit?
body: <p>A merge commit is a commit with at least two parents. These parents are in specific order.</p>
  
  <p>If I'm currently on the branch <code>master</code>, and I merge in the branch <code>feature</code>, I create a new commit with its first parent being the commit from <code>master</code>, and the second commit being the commit from <code>feature</code>. This order is especially evident by running <code>git log --first-parent</code>.</p>
  
  <pre><code>*   The merge commit
  |\
  | * The commit from `feature`
  * | The commit from `master`
  </code></pre>
  
  <p>Say I now realise that the order is the wrong way round: I intended to merge the branch <code>master</code> into <code>feature</code> by running <code>git checkout feature; git merge master</code>. I want to swap the order of the parents of a merge commit, but I do not want to go through the hassle of resolving all the merge conflicts again. How can I do this?</p>
  
  <pre><code>*   The merge commit
  |\
  * | The commit from `feature`
  | * The commit from `master`
  </code></pre>