git checkout single file

C++
git fetch
git checkout origin/master -- path/to/file

Source

Also in C++: