restore master branch git code example
Example: how to reset local master to origin master
git checkout -B master origin/master
//for branch
git checkout -B origin/
git checkout -B master origin/master
//for branch
git checkout -B origin/