title: Git rebase instead of merge, the correct way to do it?
body: <p>I would like to avoid recurrent branches intersections on my remote repository by using a <code>rebase</code> instead of a <code>merge</code>. </p>
  
  <p>To give you a better understanding of what I would like to achieve, please consider the following situation: </p>
  
  <pre><code>$ git lg
  * 2345678 hotfix (HEAD -&gt; master)
  * 1234567 foo (origin/master, origin/HEAD)
  
  $ git push 
  ! [rejected]  master -&gt; master (fetch first)
  
  $ git fetch
  $ git lg 
  * 2345678 hotfix (HEAD -&gt; master)
  | * 3456789 other change (origin/master, origin/HEAD)
  |/
  * 1234567 foo
  </code></pre>
  
  <p>Usually, the standard way of solving this issue is a <code>merge</code> followed by a <code>push</code>.</p>
  
  <pre><code>$ git merge origin/master
  $ git lg
  * 4567890 Merge remote-tracking branch 'origin/master'
  |\
  * |  2345678 hotfix (HEAD -&gt; master)
  | * 3456789 other change (origin/master, origin/HEAD)
  |/
  * 1234567 foo
  $ git push
  </code></pre>
  
  <p>I don't like this solution because I could easily avoid the branching in this particular case. So, let's revert the change with <code>git reset --hard head~1</code> and try another solution instead:</p>
  
  <pre><code>$ git rebase origin/master
  First, rewinding head to replay your work on top of it...
  Applying: hotfix
  
  $ git lg
  * 2345678 hotfix (master)
  | * 5678901 hotfix (HEAD)
  | * 3456789 other change (origin/master, origin/HEAD)
  |/
  * 1234567 foo
  </code></pre>
  
  <p>Now comes the unpleasant part where I have to move my <code>master</code> back on its <code>HEAD</code>: </p>
  
  <pre><code>$ git branch -D master
  $ git checkout -b master
  $ git push
  $ git branch --set-upstram-to=origin/master master
  Branch master set up to track remote branch master from origin.
  $ git lg 
  * 5678901 hotfix (HEAD -&gt; master, origin/master, origin/HEAD)
  * 3456789 other change
  * 1234567 foo
  </code></pre>
  
  <p>My question is how can I simplify my <code>rebase</code> and avoid the unpleasant part?</p>