Using just
git checkout .
will discard any uncommitted changes in the current directory (the dot means current directory).
EDIT in response to @GokulNK:
If you want to keep those changes for future use, you have 2 options:
git stash: this will save those changes in a stack. You can apply the changes to your working copy later usinggit stash popgit diff > changes.patch: This will save those changes to the filechanges.patch. If you want to apply them to your working copy you can do so:git apply changes.patch.