title: Get contents of a file from another branch without checking it out
body: <p>I am trying to get the content of a file from another branch.<br>
  I am doing the following:  </p>
  
  <pre><code>git checkout branchB some_specific_file.cc  
  </code></pre>
  
  <p>The current branch stays unaffected. I suspect the reason is that even though I have done a <code>git pull</code> I have never checked out <code>branchB</code> locally.<br>
  Is there a way for this command to work if I have just done a <code>pull</code> in the repo but never actually checked out the other branch?<br>
  Is there something equilalent to:  </p>
  
  <pre><code>git pull  
  git checkout branchB  
  git checkout branchA  
  git checkout branchB some_specific_file.cc 
  </code></pre>
  
  <p>without actually having to switch to branches so the last command works?</p>