reset master to origin git code example
Example 1: revert to master origin branch git
git checkout mybranch
git reset --hard origin/mybranch
Example 2: git reset head of master
git fetch origin
git reset --hard origin/master
git checkout mybranch
git reset --hard origin/mybranch
git fetch origin
git reset --hard origin/master