git same as origin master

C++
git reset --hard origin/master

Source

Also in C++: