I ran into a situation where I accidentally staged a file I didn't want to stage, and when I ran "git reset --hard" it was wiped out. After a simple google search (git recover staged files), recovering the file was simple. I've put together a loop, which will check each commit, and look for a string "responsive", which I know is in the file.
This is just a simple rundown of how to setup git properly for SSH use. SSH specific information about how to connect using SSH keys, and things of that nature, are not within the scope of this post. I will update this as I go.
I couldn't really find anything that could get me up and running really quickly with git commit emails. In this blog post we provide a git post-receive-email example. In our case, our server is CentOS.