git: revert changes made to working copy

To revert changes that you have made to your local working copy, but you have not yet commited (like svn revert), use:

git checkout .

To revert a single file:

git checkout path/to/file

To remove unversioned files:

git clean -f