title: How to make branch B exactly like branch A?
body: <p>Say I have an existing branch B (if it makes a difference, it's remote).</p>
  
  <p>I also have a branch A (either local or remote). I would like branch B to be exactly like A. If I understand correctly, merge doesn't make the branches identical, there still can be something in branch B that wasn't on branch A and it will remain there after doing <code>git checkout B</code> followed by <code>git merge A</code>. Do I understand correctly?</p>
  
  <p>Of course, I can just delete branch B and create a new branch B from A. Is that the best way?</p>
  
  <p><strong>note</strong> just to clarify it: I want to keep branch B alive because of deployment configuration. If I delete and recreate I'll need to do another thing manually for deployment.</p>