Undo changes to a file or directory in the working copy.
git checkout -- file.txt
Used over all file paths, recursively from the current directory, it will undo all changes in the working copy.
git checkout -- .
To only undo parts of the changes use --patch. You will be asked, for each chang...