title: Understanding : git push --set-upstream "refspec" with and without prefixing "HEAD"
body: <p>I have local git branch <code>&lt;BRANCH_NAME&gt;</code> that has no reference to upstream origin. I have made some  changes to local branch and <em>committed</em> the same locally. I am now trying to push to remote origin. </p>
  
  <ol>
  <li>When I tried: 
  <code>git push --set-upstream origin &lt;BRANCH_NAME&gt;</code>  it throws the error :</li>
  </ol>
  
  <pre><code>error:src refsprc &lt;LOCAL_BRANHC_NAME&gt; does not match any 
  error: failed to push some refs to '&lt;REMOTE_URL&gt;
  </code></pre>
  
  <ol start="2">
  <li>When i tried 
  <code>git push --set-upstream origin **HEAD:**&lt;BRANCH_NAME&gt;</code> it succeeded</li>
  </ol>
  
  <p>The difference between the commands is the prefixing of <strong>HEAD:</strong> to the "BRANCH_NAME". So my question is :</p>
  
  <ol>
  <li>What's difference between pushing with/without the prefix "HEAD" ? </li>
  <li>Would be helpful if I can get pictorial representation of what's happening behind the git commands for my better understanding. </li>
  <li>Let me know if more information is required from my end for clarification. </li>
  </ol>
  
  <p>NOTE:</p>
  
  <ul>
  <li>I do understand what is HEAD. It points to the latest commit of the
  current branch.  </li>
  <li>I did try the <code>cat .git/HEAD</code> and the output was <code>ref: refs/heads/&lt;BRANCH_NAME&gt;</code> - which is the correct one. </li>
  <li>I noted in some answers of stackoverflow, it was mentioned to do <code>git commit</code> . I had tried the commit approach as well and faced the same error.</li>
  </ul>
  
  <p>Thanks in advance </p>