you can just make a backup copy of .git or your entire project dir. When you get lost, just delete your .git, copy from the backup and try again
Is this a joke? git's whole purpose is to save the history of your project and return to earlier versions when needed
You never need to do that. git-reflog(1) is the most general solution if you will ever need.