title: Git: How to "undo" a merge
body: <p>The situation:
  Starting with the Master at <code>A</code> I branched and made some changes at <code>B</code> then merged that branch back in <code>(C)</code>. After making some more changes I was at <code>D</code> but found I needed to deploy the code without the changes that happened in the branch. If I hand't merged it that would have been fine.</p>
  
  <pre><code>A_______C___D
   \     /
    \_B_/
  </code></pre>
  
  <p>Firstly I'd like to know what I should have done from here to deploy the code as if the merge never happened. Note: none of the same files that were edited in the branch have been edited in the master.</p>
  
  <p>Secondly...</p>
  
  <p>I didn't have time to work out the best method to deal with this, so I deleted the files which the branch added, and manually reverted a few edits made in the branch then commited the result for deployment (<code>F</code>)</p>
  
  <pre><code>A_______C___D___F
   \     /
    \_B_/
  </code></pre>
  
  <p>I want to be able to keep developing the branch and merge any changes from the master into it to keep it up to date, but if I do that the stuff I did to create <code>F</code> will be merged in and cause the files to be deleted and the edits to be reverted. What is the best way to deal with this?</p>