Using git as a backup solution is a really bad idea.
Way too often I hear of newbie developers losing their work due to using git as their primary backup solution for their project.
So what exactly is git then? Git is a version control system and this should be its only purpose. You should be using Git to keep track of changes to your files, not to restore back to them in future.
Allow me to explain a typical scenario where this may be an issue: