If you have modified or deleted a file by mistake on a git tracked project, you can still revert your action and reset the file like this:
For a single file (file.txt)
git checkout file.txt
For all files
You may just want to revert all your changes altogether, to do so, fire this command:
git reset --hard # for help, type "git help reset"