git pull without checkout

C++
# updates local master with changes from remote
git fetch origin master:master

Source

Also in C++: