# Discarding local changes (permanently) to a file:
git checkout -- <file>
# Discard all local changes to all files permanently:
git reset --hard
git reset –hard # Revert uncommitted changes in index
git clean -fxd # Remove newly created files that not in index
git reset; git checkout .; git reset --hard HEAD; git clean -fdx;
git fetch --all; git fetch --all --tags; git pull;
git pull --recurse-submodules
git reset –-hard
git restore .