Checkout files from another branch in git

Say you're on branch foo and you need to grab some files from branch bar.

Turns out, git-checkout can help:

# on branch foo
git checkout bar path/to/file