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