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