title: How to cherry-pick from a remote branch?
body: <p>I'm having trouble performing a cherry-pick. On my local machine, I'm currently on my "master" branch. I want to cherry-pick in a commit from another branch, named "zebra". The "zebra" branch is a remote branch. </p>
  
  <p>So git status:</p>
  
  <pre><code># On branch master
  nothing to commit (working directory clean)
  </code></pre>
  
  <p>Ok, now I try to cherry-pick the commit I want:</p>
  
  <pre><code>git cherry-pick xyz
  fatal: bad object xyz
  </code></pre>
  
  <p>where "xyz" is the signature of the commit I'm interested in, that happened on branch "zebra".</p>
  
  <p>So the first obvious question is, why can't git find the commit I'm referencing? I don't really understand how this is working in the first place to be honest. Does git store something like a database of commits locally in my working directory, for all other branches? When executing the cherry-pick command, does it go and search that local database to find the commit I'm talking about?</p>
  
  <p>Since "zebra" is a remote branch, I was thinking I don't have its data locally. So I switched branches:</p>
  
  <pre><code>git checkout zebra
  Switched to branch 'zebra'
  </code></pre>
  
  <p>So now here on my local machine, I can see that the files in the directory reflect zebra's state correctly. I switch back to master, try to cherry-pick again (hoping the commit data is available now), but I get the same problem.</p>
  
  <p>I've got a fundamental misunderstanding of what's going on here, any help would be great.</p>