# Discarding local changes (permanently) to a file: git checkout -- <file> # Discard all local changes to all files permanently: git reset --hard
git reset --hard
git stash save --keep-index --include-untracked
git checkout -- .
git reset HEAD git checkout .
git checkout HEAD -- my-file.txt