title: git pull while not in a git directory
body: <p>Let's say I have a directory, <code>/X/Y</code>, which is a git repository. Is it possible to somehow call a command like <code>git pull</code> from inside <code>/X</code>, but targeting the <code>/X/Y</code> directory?</p>
  
  <p><strong>EDIT:</strong> I guess I was wondering specifically: is it possible to do this using the a git command, but without having to change directories?</p>
  
  <p><strong>NOTE:</strong> I've accepted <a href="https://stackoverflow.com/questions/5083224/git-pull-while-not-in-a-git-directory/20115526#20115526">VonC's answer</a> as it's much more elegant than previous options. For people running Git older than 1.8.5, please see <a href="https://stackoverflow.com/questions/5083224/git-pull-while-not-in-a-git-directory/5083437#5083437">bstpierre's answer below</a>.</p>