git force pull ignore local changes code example
Example 1: git replace local branch with remote
git fetch
git reset --hard origin/{{branch}}
# replace {{branch}} with name
Example 2: how to pull the changes from git without staging local changes
git stash save
git pull
git stash pop
Example 3: git remove my local changes and pull from master
git reset --hard <your commit hash key>