git replace local branch with origin code example Example: git replace local branch with remote git reset --hard origin/master