There might be different approaches to do a task. But, here, we have only one way to delete the GitHub repository. We are going to see it in detail.
Let’s get started without further ado.
Deleting a Repository
Don’t get confused. GitHub web app is nothing but the website. Technically, it’s a web application, not a website. But, most of us get used to the word website—a new technical thing for those who don’t know about it.
Anyway, let’s go to our main topic of deleting a repository in GitHub.
Unfortunately, not that I am aware of. There’s no other way to delete a GitHub repository as of now.
Restoring a Repository
What if you deleted a repository by mistake? Is there a chance to get it back?
Yeah, we can restore the repository with some exceptions. Let’s see how to restore our deleted GitHub repository.
There are two instances where we can’t restore the repository.
The number of days deleted repository exceeds 90 days.
If the repository is part of the fork network until all other repositories are deleted.
Let’s see the steps to restore a repository.
Go to settings in your GitHub account.
Click on the Repositories button from the left navbar.
You will navigate to the repositories page as follows.
Click on the Deleted repositories button from the Repositories section.
You will see all your deleted repositories as follows.
Read the info message in the above pic. As they mention, it may take an hour to show our deleted repositories in the section.
Once your repository is shown in the Deleted repositories section, you can restore it.
You will find a Restore button at the end of the repository item, as shown below.
Click the restore button.
GitHub will show us a modal with a message what will be restored.
Read the message.
Click on the I understand, restore this repository for confirmation.
It’ll show Done! message as follows.
Go to the home page and search for the repository. There you go, you will find the restored repository.
Make sure you are deleting the repository that’s not useful for you. And make use of the restoration option in case you deleted a repository by mistake.
And we can back up a repository in cloud storage. Storing the repository zip in cloud storage like Google Drive, Dropbox, etc.., might help us in the future. If there is a situation where deleting a repository is uncertain, then you can back up the repository in any cloud storage platform and delete it.
Back up will be useful when you are deleting a complex project. Creating complex or big projects from scratch will take a lot of time. You may back up the complex repositories before deleting them.
Python is a very versatile language, and Python developers often have to work with a variety of files and get information stored in them for processing. One popular file format you’re bound to encounter as a Python developer is the Portable Document Format popularly known as PDF