how to remove all local changes in git code example
Example 1: remove local changes git
git fetch # will fetch the latest changes on the remote
git reset --hard origin/master # will set your local branch to match the representation of the remote just pulled down.
Example 2: clear local changes in git
git checkout .