title: How to duplicate a branch into another existing branch in git
body: <p>I would like to push all the changes in one branch to another branch (existing branch) without merging.</p>
  
  <p>For the example, consider two branches branch1 to branch2. Both branch1 and branch2 track origin/branch1 and origin/branch2 respectively.</p>
  
  <p>Branch1 has commits A,B,C,D,E,F
  Branch2 has commits A,B,D,F</p>
  
  <p>I would like to make Branch2 exactly like branch1. Cherry-picking and merging would give conflict which i dont wanna spend time resolving, because all i am trying to do is, blindly replicating branch1 into branch2.</p>
  
  <p>I am able to do this by </p>
  
  <pre><code>git checkout branch1 # Moves to branch1
  git push origin :branch2 # Deletes remote branch origin/branch2
  git branch -d branch2 # Deletes the local copy of this branch
  git pull
  git push origin HEAD:branch2 # Creates new branch in remote repository from the HEAD at local branch branch1
  </code></pre>
  
  <p>Is there a better way of doing this through some --force options in merge commands. I dont want to delete the branch everytime just to create a new branch with the same name.</p>
  
  <p>Thanks</p>