git override local file with remote

C++
git reset --hard origin/mastergit fetch
git checkout origin/master <filepath>
Source

Also in C++: