I was trying to attach a project to a GIT repository yesterday and it deleted my whole folder.
git didn't probably didn't delete the information, you probably did when you subsequently deleted the .git folder.
If you have successfully git pushed to a repository before deleting the .git folder, you can get back information from the repository that you pushed by "cloning" it. If there was no repository pushed to before you removed the .git folder, git can't help you and you'll need one of the general backup/restore kinds if solutions you might have available.
To retrieve from a repository that you have previously "git push"ed to,
run git clone https://domain/DefaultCollection/_git/projectName
or whatever the correct URL is. Best to do this under a new directory, say in /tmp
. Then check things out and if this is what you expect, rename the old folder if it is still there. And move the newly checked-out directory (a git project) to the parent of the old location.
Important. When reporting results make sure to not only give your conclusion but also both the input that you typed and the output you received in response to the input. That helps the people trying to help you. You may think it obvious what went on from your description, but sometimes there is other information that you don't understand that can be obtained by giving the facts rather than your impression of them. And giving facts is also the simplest more fool-proof thing to do.
Lastly, if it is not obvious now, deleting everything in .git is generally a mistake. That directory starts with "." precisely to make it hard for people to casually change it. A good habit to get into is to instead of deleting folders, move them. Alternatively backups such as time machine on OSX are cool too.