What if my GitHub repository is corrupted or deleted?
Don’t Panic! Because of the distributed nature of git, everyone always has a local full copy of the repository, complete with history. Any of your repositories, assuming they have been kept up to date, can be uploaded to the GitHub repository with no loss of data.
Read the full article.