# Revert changes to modified files.
git reset --hard
# Remove all untracked files and directories.
# '-f' is force, '-d' is remove directories.
git clean -fd
# https://stackoverflow.com/a/44672195/3013522
git reset --soft HEAD~
git reset
git checkout .
git clean -fdx