title: How git clone actually works
body: <p>I have a repository on Github with 2 branches: <code>master</code> and <code>develop</code>.</p>
  
  <p>When I clone the repository and run <code>$ git branch</code> it shows only the <code>master</code> branch.<br>
  If I run <code>$ git branch -a</code> I can see all the remote branches.</p>
  
  <p>Now, if I do a <code>$ git checkout develop</code>, I get the message:</p>
  
  <blockquote>
    <p>Branch develop set up to track remote branch develop from origin.<br>
    Switched to a new branch 'develop'</p>
  </blockquote>
  
  <p>What actually happened? Were the commits from the remote <code>develop</code> branch fetched when I ran <code>$ git clone remote-url</code>, or when I ran: <code>$ git checkout develop</code>, or neither?</p>
  
  <p>Have I to do a <code>$ git pull origin develop</code> after checking out <code>develop</code>, or it's already done?</p>
  
  <p>Please help me understand how <code>clone</code> works when there are multiple branches on remote.</p>