Reputation: 177
I deleted a repository after I did serveral commits that by uploading file.Then I created a new repository given the same name of the previous repository, I can only find 21 commits now,but there exists 37 commits actually, is it possible to recover the other 16 commits? how to recover it ?
Upvotes: 0
Views: 77
Reputation: 13973
Some deleted repositories on GitHub can be restored within 90 days. It might take up to an hour (after deletion) for a repository to be available for restoration. If it does not show up yet, be patient. The deleted repository must have been owed by your user account, or by the organisation account if it was owned by an organisation account.
First, you need to make sure that you don't have a repository with the same name as the one you want to restore. Rename the newly created repository and give it a meaningful name to differentiate them easily.
Then, you can restore the repository like this:
There is an individual entry for each deleted repository even if the name was the same or there is currently a repository with the same name.
If you have waited more than one hour and the repository does not show up in the list, you can create a ticket for GitHub Support on the topic Restore deleted data.
If you are using GitHub Enterprise Server, contact the support team of your organisation.
Upvotes: 1