title: git switch which branch is master branch after push
body: <p>I have a fork of someone else's repo like and have committed a number of changes to my master branch like so, and pushed to my fork:</p>
  
  <pre><code>[upstream/master] --- C1 --- C2[origin/master]
  </code></pre>
  
  <p>I then decided that I want my changes <code>C1</code> and <code>C2</code> to be part of a branch <code>feature_branch1</code>, and I want my <code>master</code> branch to be back at <code>upstream/master</code>:</p>
  
  <pre><code>[upstream/master === origin/master] --- C1 --- C2[origin/feature_branch1]
  </code></pre>
  
  <p>I achieved this via:</p>
  
  <pre><code>git checkout C2
  git branch -m feature_branch1
  git checkout upstream/master
  git branch -m master
  </code></pre>
  
  <p>(don't know if that was the way I was meant to do it).</p>
  
  <p>I then added some extra features off my <code>master</code> branch like so:</p>
  
  <pre><code>                                     C1 --- C2 [origin/feature_branch1]
                                     / 
  [upstream/master === origin/master]
                                     \ 
                                       C1' --- C2' [origin/feature_branch2]
  </code></pre>
  
  <p>(<code>git checkout master; git checkout -b feature_branch2; &lt;changes&gt;; &lt;commits&gt;</code>)</p>
  
  <p>Now I'm trying to push to remote. I've pushed <code>feature_branch1</code> and <code>feature_branch2</code> successfully (<code>git push origin feature_branchX</code>), but when I try to push master I get an error about not being able to fast forward and losing history.</p>
  
  <p>I kind of get this - I think it doesn't want me to lose <code>C1</code> and <code>C2</code> by moving <code>master</code> back to the branch-point. But I've saved <code>C1</code> and <code>C2</code> in <code>feature_branch1</code> already, so I won't lose them.</p>
  
  <p>Is there any way I can achieve the diagram above?</p>