title: why git fetch origin master failed?
body: <p>Assume that my local repository is one commit behind the repository at github.</p>
  
  <p>Then I commit one commit at the local repository </p>
  
  <p>At this time</p>
  
  <p>A------>commit 1  Github/master</p>
  
  <p>A------>commit 2  local repository/master</p>
  
  <p>I do the following steps to push commit 2 to github:</p>
  
  <ol>
  <li>git fetch origin master</li>
  <li>git rebase origin/master</li>
  <li>git push origin master</li>
  </ol>
  
  <p>But I got the following errors:</p>
  
  <p><img src="https://i.stack.imgur.com/FQ9k8.jpg" alt="enter image description here">
  If I try to replace step 1 with <code>git fetch origin</code>, it works well</p>
  
  <p>Then I tried <code>git fetch origin master:tmp</code>, a branch named tmp successfully created</p>
  
  <p>So, My question is</p>
  
  <p>why <code>git fetch origin master</code> sometimes works(in the case <code>git fetch origin master:tmp</code>), while sometimes not work in the case step 1?</p>