Repositories with ambiguous or incomplete intentions might harm your GitHub reputation. Is your GitHub home to any unwanted or suspicious public repositories? Then you should remove them to clear things up.
In this post, we’ll guide you on how to do that.
Why You Need to Delete Bad GitHub Repositories
While job seeking, you don’t want to show a sloppy GitHub to prospective employers. Poor practice code repositories or ambiguous incomplete projects do not provide a decent impression of your expertise.
Furthermore, it may cause prospective customers to question your competency.
These problems may not apply to you if you don’t use GitHub professionally. But if you want to become serious with your processes and present a more professional GitHub, you need tidy up your repositories. Begin by removing any that do not add value to your GitHub credentials.
How to Delete a Remote Repository on GitHub
GitHub doesn’t offer a command line option for deleting repositories. As a result, you need to delete it manually via the web app.
However, you must be an administrator with permission access before you can delete a GitHub repository.
Related: How to Clean Git and Remove Untracked Files
To delete a GitHub repository, open your browser and log in to your GitHub account. Then use the following steps:
- Click the circular profile icon in the web app’s top-right corner.
- Select Your repositories from the menu to load all of your repositories.
- Choose the repository you want to remove.
- Click Settings at the top of the chosen repository menu.
- Scroll to the bottom of the settings page to find the Danger Zone area.
- Click Delete this repository to delete the specified repository.
- In the form given, input your username/repository name from the pop up window.
- If you’re confident you want to delete the repository, click I understand the risks, delete this repository to remove it from your GitHub remote repository.
What Happens When You Delete a Remote Repository?
Removing a repository on GitHub is like deleting a file completely from your PC. However, when you delete a remote repository, you should take note of the following:
- A deleted repository cannot be recovered.
- The deletion of a remote repository has no effect on the project files locally.
- It also has no effect on your local repository.
- It also deletes all comments, packages, workflow, and administrators.
- A repository that has been removed cannot be forked.
Considering the consequences of deleting a GitHub repository, you might want to change your mind. However, GitHub also lets you archive repositories instead of deleting them.
In the Danger Zone, click Archive this repository to obtain that option.
How to Delete a Local GitHub Repository
If you choose, you may also remove a local GitHub repository. All you have to do is remove the.git folder from the root of your project.
To do so, use the command prompt and go to the root folder of your project. Then enter the following code:
rm -rf .git
While the above command works for Mac and Linux, the procedure for Windows is somewhat different.
Related: Windows CMD Commands You Must Know
Open the command line as an administrator to remove a local repository on Windows. Enter cmd in the Windows search bar to do so.
Right-click cmd in the search result and choose Properties. Select Run as administrator from the menu.
Once the command line is open, use cd..> to exit the system directory. Then, cd into your project’s root folder and run the following command:
However, if the .git folder isn’t empty, use:
rmdir /s .git
Organize Your GitHub Repositories
Your internet credentials include your GitHub repository. It may function as a portfolio for prospective customers to see your processes and projects that you’ve accomplished or are currently working on.
However, in addition to keeping the ambiguous ones out, giving your repositories specific names helps visitors understand what they’re looking at at a glance.
You are looking for information, articles, knowledge about the topic How to Delete Unwanted Repositories on GitHub on internet, you do not find the information you need! Here are the best content compiled and compiled by the achindutemple.org team, along with other related topics such as: How.