title: Why there is no remotes/origin/HEAD --> origin/master for a new branch which I pushed to repo
body: <p>I created a git branch and pushed it to origin master. Now when I do <code>git branch --all</code> it does not show me <code>remotes/origin/HEAD --&gt; origin/master</code>.  I am able to perform all the git operations though. </p>
  
  <ul>
  <li>Is this expected?  </li>
  <li>What is the logic behind having/not having this
  entry?</li>
  </ul>
  
  <blockquote>
    <p><strong>Edit:</strong></p>
  </blockquote>
  
  <p>Looks like there is some confusion in what I actually did. I imported a repo from p4
  Here is the sequence:</p>
  
  <pre><code> 1. git init 
   2. ../git/git-p4.py clone --detect-branches //projects/&lt;my_project_path_in_p4&gt;
   3. git checkout -q -b master refs/remotes/p4/&lt;my_project_path&gt;
   4. git add --all
   5. git commit -m "Initial Commit"
   6. git remote add origin &lt;my_git_path&gt;
   7. git push origin master
  </code></pre>
  
  <p>and then when i do git branch --all i don't see that particular entry:</p>
  
  <pre><code>* master
  remotes/origin/master
  remotes/p4/workflow_manager/workflow_manager-15.3.0
  </code></pre>
  
  <blockquote>
    <p>** Second Edit:**</p>
  </blockquote>
  
  <p>When I clone the same branch and do <code>git branch --all</code> I get <code>remotes/origin/HEAD --&gt; origin/master</code>. Here is the output after cloning which is expected</p>
  
  <pre><code>* master
  remotes/origin/HEAD -&gt; origin/master
  remotes/origin/master
  </code></pre>
  
  <p>So now I am even more confused :)</p>