title: How can I selectively merge or pick changes from another branch in Git?
body: <p>I'm using Git on a new project that has two parallel -- but currently experimental -- development branches:</p>
  <ul>
  <li><code>master</code>: import of existing codebase plus a few modifications that I'm generally sure of</li>
  <li><code>exp1</code>: experimental branch #1</li>
  <li><code>exp2</code>: experimental branch #2</li>
  </ul>
  <p><code>exp1</code> and <code>exp2</code> represent two very different architectural approaches. Until I get further along I have no way of knowing which one (if either) will work. As I make progress in one branch I sometimes have edits that would be useful in the other branch and would like to merge just those.</p>
  <p><strong>What is the best way to merge selective changes from one development branch to another while leaving behind everything else?</strong></p>
  <p>Approaches I've considered:</p>
  <ol>
  <li><p><code>git merge --no-commit</code> followed by manual unstaging of a large number of edits that I don't want to make common between the branches.</p>
  </li>
  <li><p>Manual copying of common files into a temporary directory followed by <code>git checkout</code> to move to the other branch and then more manual copying out of the temporary directory into the working tree.</p>
  </li>
  <li><p>A variation on the above. Abandon the <code>exp</code> branches for now and use two additional local repositories for experimentation.  This makes the manual copying of files much more straightforward.</p>
  </li>
  </ol>
  <p>All three of these approaches seem tedious and error-prone.  I'm hoping there is a better approach; something akin to a filter path parameter that would make <code>git-merge</code> more selective.</p>