discard changes and pull git code example Example: git pull master discard local changes git reset --hard origin/master git pull origin master