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