So you've lost some source files? No problem, you can recover the last checked in version from
git just by doing a
$ rm README ChangeLog
$ git checkout
$ git checkout .
$ ls -l README ChangeLog
-rw-rw-r-- 1 kaz kaz 15445 Apr 11 11:46 ChangeLog
-rw-rw-r-- 1 kaz kaz 4756 Apr 11 11:46 README
What, no version control? Ah, but you keep backups, of course. Go to the backup disk, and get yesterday's version from the nightly snapshot.
Oops, no backups either? You are probably screwed then.
There is no reliable way to undelete files. There are utilities which give a "best effort", without guarantees. Once you delete a file, the blocks which it occupied can be immediately recycled for another use.
extundelete could, ironically, overwrite the files.
After accidentally deleting something for which there is no backup, I would immediately unmount the hard drive (or power of the machine, really) to stop all destructive disk activity ASAP. Then use another system to mount that drive and try to recover the files. I would either boot into another partition of the same machine, or physically remove the drive, pop it into my handy USB external drive enclosure, and mount it on another Linux system to do the recovery.
In the future, use version control and keep backups. If your hard disk died today, what would happen to your other projects?