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 HEAD~;
# Warning: hard resets the index and working tree.
# Any changes to tracked files in the working tree since the previous commit are discarded
git reset –-hard
git clean -df
git checkout -- .
For all tracked unstaged files use:
git checkout -- .
The . at the end is important.