title: Why do I have to git pull origin <branch-name> in git?
body: <p>I am new to using GIT and I read the documentation guide but I can't seem to wrap my head around one thing.</p>
  
  <p>Let's say the github source contains two branches, master and foobar.
  Now, when I do <code>git branch</code> on my system, it shows the names of both the branches which means I have both the branches on my system. </p>
  
  <p>However, when I do a <code>git checkout foobar</code> and then do <code>git pull</code>, nothing really happens and instead git tells me, </p>
  
  <p>`There is no tracking information for the current branch.
  Please specify which branch you want to merge with.
  See git-pull(1) for details.</p>
  
  <pre><code>git pull &lt;remote&gt; &lt;branch&gt;
  </code></pre>
  
  <p>If you wish to set tracking information for this branch you can do so with:</p>
  
  <pre><code>git branch --set-upstream-to=origin/&lt;branch&gt; foobar
  </code></pre>
  
  <p>`</p>
  
  <p>It's only when I execute <code>git pull origin foobar</code> are the files modified and changed according to what has been updated on GitHub. Why does this happen? Where am I going wrong in doing <code>git pull</code>. AFAIK, I thought doing <code>git pull</code> will update my current branch to the latest code commits. </p>