title: What determines default branch after "git clone"?
body: <p>My understanding is that the default branch of a cloned repository is to be whatever HEAD points to in the repo being cloned.</p>
  
  <p>I now have a case where this is not true. My understanding is obviously flawed, so what does determine the default checkout branch when cloning a (bare) repo?</p>
  
  <p>The last commit on that repo was a merge between the branch referenced in the bare repo's HEAD into the branch I'm getting as the checkout branch in the clone.</p>
  
  <p>Running <code>git remote show origin</code> returns:</p>
  
  <pre><code>Fetch URL: ...
  Push  URL: ...
  HEAD branch (remote HEAD is ambiguous, may be one of the following):
    &lt;bad-branch&gt;
    live
  Remote branches:
    ...
  </code></pre>
  
  <p>Bare repo uses Git version 1.8.2.1, client uses 1.7.12.4, transport is SSH.</p>
  
  <p>Maybe the answer is actually <a href="https://stackoverflow.com/questions/13061364/why-git-remote-show-name-display-remote-head-is-ambiguous-may-be-one-of-the">this one here</a>. <a href="https://stackoverflow.com/questions/2574517/error-with-git-remote-head-is-ambiguous-may-be-one-of-the-following">This answer</a> confirms it. If there is a choice of symbolic refs all pointing to the same revision as HEAD, the client will <em>guess</em> which branch to use. </p>