github how to delete repository
Repositories with incomplete or vague intents can hurt your reputation on GitHub. Is your GitHub full of unwanted or sketchy public repositories? Then you might want to delete them to tidy things up.
In this post, we'll guide you on how to do that.
Why You Need to Delete Bad GitHub Repositories
You don't want to present a messy GitHub to potential employers while job hunting. Poor repositories full of practice code or vague unfinished projects don't present a good picture of your abilities.
Furthermore, it can make potential clients doubt your competence.
These problems may not apply to you if you don't use GitHub professionally. But if you plan to get serious with your workflows and present a more professional GitHub, you should clean up your repositories. You can start by removing those that don't 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.
To delete a GitHub repository, open your browser and log in to your GitHub account. Then use the following steps:
- Click the round profile icon at the top-right corner of the web app.
- From the dropdown, select Your repositories to load all your repositories.
- Select the repository you wish to delete.
- Look to the top of the selected repository menu and click Settings.
- Scroll to the bottom of the settings page and you'll see a section named Danger Zone.
- To delete the selected repository, click Delete this repository.
- From the pop up box, type your username/repository name in the field provided.
- If you're certain you want to delete the repository, click I understand the consequences, delete this repository to remove it from your remote repository on GitHub.
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:
- You can't retrieve a deleted repository.
- Deleting a remote repository doesn't affect the project files locally.
- It doesn't affect your local repository either.
- All comments, packages, workflow, and administrators are deleted with it.
- A deleted repository 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.
You can access that option by clicking Archive this repository in the Danger Zone.
How to Delete a Local GitHub Repository
You can also delete a local GitHub repository if you want. All you need to do is delete the .git folder in your project root.
To do that, open the command line and cd into your project root folder. Then type the following command:
rm -rf .git
While the above command works for Mac and Linux, the process is a bit different on Windows.
To delete a local repository on Windows, open the command line as an administrator. You can do that by typing cmd in the Windows search bar.
Right-click cmd from the search result. From the options, select Run as admistrator.
Once the command line opens, leave the system directories by using <cd..>. Then cd into the root folder of your project and type the following command:
rmdir .git
However, if the .git folder isn't empty, use:
rmdir /s .git
Organize Your GitHub Repositories
Your GitHub repository is part of your online credentials. It can serve as a portfolio where potential clients can check your workflows and projects you've either completed or executing.
However, in addition to keeping the vague ones out, giving your repositories definite names helps people know what it's all about at a glance.
What Is GitHub? An Introduction to Its Basic Features
Interested in collaborative coding and easy code sharing? It's time you learned what GitHub is, and its main features.
Read Next
About The Author
Idowu Omisola (109 Articles Published)
Idowu is passionate about anything smart tech and productivity. In his free time, he plays around with coding and switches to the chessboard when he's bored, but he also loves breaking away from routine once in a while. His passion for showing people the way around modern tech motivates him to write more.
More From Idowu Omisola
github how to delete repository
Source: https://www.makeuseof.com/how-to-delete-unwanted-repositories-on-github/
Posted by: jefferysionuirt.blogspot.com
0 Response to "github how to delete repository"
Post a Comment