title: Is it possible to move files or file changes between branches?
body: <p><strong>Summary</strong>: I forgot to switch branches when developing and would like to move the files/changes to the appropriate branch.</p>
  
  <p><strong>Details</strong>: I have two files <code>A</code> and <code>B</code> which are initially in <code>master</code>. I then created a branch <code>branch1</code> to make some breaking changes in file <code>A</code>.</p>
  
  <p>While developing these changes I also modified <code>B</code> and created a file <code>C</code>. The problem is that I now realize I made a mistake with branching and that </p>
  
  <ul>
  <li>the file <code>B</code> should be in its own <code>branch2</code> (which does not exist), </li>
  <li>file <code>C</code> belongs in <code>master</code>. </li>
  </ul>
  
  <p>All of them are now commited in <code>branch1</code>.</p>
  
  <p>The commits were pushed to a remote repository but it does not matter that much, I can have the other developer clone the repo (as opposed to fetch).</p>
  
  <p><strong>What is the general methodology to recover in such a case, ie. to move files or changes between branches?</strong></p>