How to remove repository from github

How to remove repository from github

How to Delete a GitHub Repository

by Shahed Nasser | Last updated on July 12, 2022

How to remove repository from github. Смотреть фото How to remove repository from github. Смотреть картинку How to remove repository from github. Картинка про How to remove repository from github. Фото How to remove repository from github

Your GitHub account is a great showcase for your skills and experience as a developer. It can include personal projects, projects you’ve contributed to, open-source projects you are part of, or any other kind of project you’ve worked on over the years.

With time, you’ll find that certain repositories no longer belong in your GitHub portfolio. You might have used older techniques and made coding mistakes that you wouldn’t make now. Some repositories might be outdated to the point that they shouldn’t be used by anyone. Not only are such repositories unhelpful, but they could make you look less professional.

This article will explain how to delete a GitHub repository using the UI, how to archive a GitHub repository, and then how to achieve those same results by using Rewind, formerly known as BackHub, instead.

The Basics of Closing a Repository

There are two basic ways to close a GitHub repository and end its lifecycle. You can delete it permanently using GitHub’s UI, or you can archive it, which makes it read-only.

Below are instructions for performing both tasks. The key is knowing which option to choose, and what factors you need to consider when making your choice.

Deleting a Repository

When you delete a GitHub repository, you delete it permanently with all its data, including the codebase, issues, pull requests, and everything else related to it. Proceed with caution when using this method, as you will not be able to restore the data.

How to remove repository from github. Смотреть фото How to remove repository from github. Смотреть картинку How to remove repository from github. Картинка про How to remove repository from github. Фото How to remove repository from github

How to remove repository from github. Смотреть фото How to remove repository from github. Смотреть картинку How to remove repository from github. Картинка про How to remove repository from github. Фото How to remove repository from github

A window will pop up asking you to confirm by entering the repository’s name.

Once you confirm, the GitHub repository will be deleted, but you’ll be able to recover it from your settings within ninety days. After ninety days, the repository will be completely gone.

Archiving a Repository

When you archive a GitHub repository, it will still be viewable to everyone, but a notice at the top of the repository will show that it’s read-only.

Before you archive a repository, make sure that you close or resolve any open issues and pull requests, as you won’t be able to do that afterward.

To archive a repository, open it and click the Settings tab.

How to remove repository from github. Смотреть фото How to remove repository from github. Смотреть картинку How to remove repository from github. Картинка про How to remove repository from github. Фото How to remove repository from github

How to remove repository from github. Смотреть фото How to remove repository from github. Смотреть картинку How to remove repository from github. Картинка про How to remove repository from github. Фото How to remove repository from github

When you click on the button, a window will ask you to enter the repository’s name to confirm.

Once you confirm, the repository will be archived and a notice will be added to the repository’s page.

How to remove repository from github. Смотреть фото How to remove repository from github. Смотреть картинку How to remove repository from github. Картинка про How to remove repository from github. Фото How to remove repository from github

How to Choose

If you’re absolutely sure that you won’t need the repository or any of its data anymore, then go ahead and delete it. This is also the better choice if you’re concerned about people being able to access the repository.

However, if you just want anyone who views your profile to know that they shouldn’t use this repository, or if you think you might need it in the future, then it’s best to archive the repository instead.

Downsides of Both

Each of these options has a problem that you should be aware of when choosing between these approaches.

Local Copies Remain

When you delete a repository, any local copy of the code—on your machine or other machines—will not be removed. The code will still be available, just without the remote repository.

If you’re removing a repository to ensure that it’s deleted from other people’s devices, be aware that this approach will not do that. This will just remove the repository from GitHub.

Forked Repositories Are Usable

Although archived repositories are read-only and changes cannot be made on them, they can still be forked, or copied. This means that someone can fork your archived repository and keep using it normally.

Therefore, you shouldn’t archive a repository on the assumption that no one will be able to use it or do rework on it.

Using Rewind Instead

Rewind provides you with a better approach to archiving or deleting repositories. It connects to your GitHub account and backs up your repositories daily. The backup includes not only the codebase but also issues, pull requests, and other metadata.

Benefits of Backups

Rewind allows you to restore a repository to any given point in time after you start backing it up. This includes open repositories as well as repositories that you’d deleted but had already backed up.

When you delete a repository in GitHub, it becomes archived in Rewind. That means it won’t need further backups, but you can restore it and its associated data at any point in the future. You can also delete the archived repository completely if you’re sure you won’t need it anymore.

Restoring a Deleted Repository with Rewind

After you create an account on Rewind, it will automatically back up all your repositories or the repositories you choose to give access to.

Once all your repositories are backed up, you can safely go ahead and delete a repository on GitHub by using the same steps listed earlier.

After the GitHub repository is deleted, you will find it grayed out in your Rewind account. This means the repository is now archived in Rewind.

How to remove repository from github. Смотреть фото How to remove repository from github. Смотреть картинку How to remove repository from github. Картинка про How to remove repository from github. Фото How to remove repository from github

How to remove repository from github. Смотреть фото How to remove repository from github. Смотреть картинку How to remove repository from github. Картинка про How to remove repository from github. Фото How to remove repository from github

You will be asked to enter the repository’s name and visibility.

How to remove repository from github. Смотреть фото How to remove repository from github. Смотреть картинку How to remove repository from github. Картинка про How to remove repository from github. Фото How to remove repository from github

You will need to give access to BackHub Restore on your GitHub account. BackHub Restore requires read and write permission (while the regular backup app simply requires read permission). You can choose a random repository to do this.

How to remove repository from github. Смотреть фото How to remove repository from github. Смотреть картинку How to remove repository from github. Картинка про How to remove repository from github. Фото How to remove repository from github

After that, Rewind will start restoring your repository into a new repository. You can check the progress in detail on your Rewind profile. It will show messages like “Restoring Issues.”

After the restore is done, you will be notified by a message on your Rewind profile.

How to remove repository from github. Смотреть фото How to remove repository from github. Смотреть картинку How to remove repository from github. Картинка про How to remove repository from github. Фото How to remove repository from github

If you go to your GitHub profile, you’ll find the newly restored repository with the name you entered when you started the restore process. It will have the same code, issues, pull requests, and other data, just as if it were never deleted.

Permanently Deleting a Repository

If you don’t want a repository you deleted or archived on GitHub to remain backed up on Rewind, you can go to the archived repository on Rewind and expand it. You’ll see a Delete button.

How to remove repository from github. Смотреть фото How to remove repository from github. Смотреть картинку How to remove repository from github. Картинка про How to remove repository from github. Фото How to remove repository from github

When you click on the button, you’ll be asked to perform your action in a pop-up. Keep in mind that if you delete the repository’s backups from Rewind, you will not be able to access them again. Only proceed if you’re sure.

After Rewind confirms the deletion, the repository and its backups will be deleted from your account.

Conclusion

It’s important to maintain your GitHub profile to the highest standard because it can encourage employers to hire you or new clients to work with you. Sometimes old GitHub repositories, unfinished projects, or other concerns can be problematic for your portfolio.

Using Rewind, you can ensure that your repositories are constantly backed up, and if at any point you need to remove a repository from your GitHub profile, you will still be able to restore it completely using Rewind’s backups.

How to delete a GitHub repo using the API

I am getting familiar with the GitHub API http://developer.github.com/v3/ I am trying things out both with RESTClient plugin for Firefox and with curl command line tool.

I have found out how to create a repo with the API, however I can’t seem to delete it with the API.

According to the help here: http://developer.github.com/v3/repos/#delete-a-repository I must send a DELETE request like this:

What am I missing?

How to remove repository from github. Смотреть фото How to remove repository from github. Смотреть картинку How to remove repository from github. Картинка про How to remove repository from github. Фото How to remove repository from github

2 Answers 2

Trending sort

Trending sort is based off of the default sorting method — by highest score — but it boosts votes that have happened recently, helping to surface more up-to-date answers.

It falls back to sorting by highest score if no posts are trending.

Switch to Trending sort

Look for the X-OAuth-Scopes response header which will have the list of scopes:

X-OAuth-Scopes: user, public_repo, repo, gist

So, you need a token that has different scopes than the one you have. You can create such a token using the Authorizations API:

This will return a JSON document with the new token which you should be able to use to delete a repository:

Of course, when creating a token this way, you can ask for multiple scopes, not just the delete_repo scope.

Also, as a side-note, the reason why the API is returning a 404 error when you don’t have the right authorization is to prevent information leakage.

How to remove repositories that I don’t own from GitHub dashboard

I forked a repo on GitHub then I created a pull request to with my changes and then I changed my mind so I closed the pull request and I deleted the fork I made on the repo. The problem is that the repository(not the fork) is still showing in the Repositories list in the GitHub dashboard (see picture below)

How to remove repository from github. Смотреть фото How to remove repository from github. Смотреть картинку How to remove repository from github. Картинка про How to remove repository from github. Фото How to remove repository from github

See the reeeeeeeeeee. /reeeeeeee. repository is the one that I want to delete from there but I can’t. I tried everything. If I go to my profile and click on repositories it isn’t there because I removed the fork.

How to remove repository from github. Смотреть фото How to remove repository from github. Смотреть картинку How to remove repository from github. Картинка про How to remove repository from github. Фото How to remove repository from github

1 Answer 1

I recently had the same «issue» of having a repository on my left sidebar in my dashboard, which I thought would disappear as I removed it from my account. After contacting the Github Support Service they replied with the following message:

The list of repositories in your sidebar will display your repositories as well as any repository you’ve interacted with in the past 4 months. It looks like you opened this Pull Request there:

This would count as a contribution, which adds the repository to your contributed to repository list. Once that activity is 4 months old, that will be removed from your sidebar.

This is a late reply to your question and it might already be removed, however I hope this can clear up some confusion for someone else in the future.

Repositories

Learn to use and manage the repositories that allow you to store and collaborate on your project’s code.

Guides

Cloning a repository

When you create a repository on GitHub.com, it exists as a remote repository. You can clone your repository to create a local copy on your computer and sync between the two locations.

Restoring a deleted repository

You can restore some deleted repositories to recover their contents.

Adding a file to a repository

You can upload and commit an existing file to a repository on GitHub or by using the command line.

Licensing a repository

Public repositories on GitHub are often used to share open source software. For your repository to truly be open source, you’ll need to license it so that others are free to use, change, and distribute the software.

Popular

What’s new

Deleting a repository

You can delete any repository or fork if you’re either an organization owner or have admin permissions for the repository or fork. Deleting a forked repository does not delete the upstream repository.

Managing a branch protection rule

You can create a branch protection rule to enforce certain workflows for one or more branches, such as requiring an approving review or passing status checks for all pull requests merged into the protected branch.

Setting repository visibility

You can choose who can view your repository.

Delete a Git repo from your project

Azure DevOps Services | Azure DevOps Server 2022 | Azure DevOps Server 2020 | Azure DevOps Server 2019 | TFS 2018

Remove unused Git repos from your project when they are no longer needed. The steps in this article show how to delete a Git repo from your Azure DevOps project. If you want to delete the entire project, see Delete a project.

You cannot remove a repo if it is the only Git repo in the Azure DevOps project. If you need to delete the only Git repo in a project, create a new Git repo first, then delete the repo.

Prerequisites

If you want to use the Azure DevOps CLI az repos delete command, follow the steps in Get started with Azure DevOps CLI.

Delete a Git repo from the web

Consider renaming the repo and locking its default branch instead of removing it. The commit history of the repo will be lost when it is deleted.

Select Repos, Files.

How to remove repository from github. Смотреть фото How to remove repository from github. Смотреть картинку How to remove repository from github. Картинка про How to remove repository from github. Фото How to remove repository from github

From the repo drop-down, select Manage repositories.

How to remove repository from github. Смотреть фото How to remove repository from github. Смотреть картинку How to remove repository from github. Картинка про How to remove repository from github. Фото How to remove repository from github

Select the name of the repository from the Repositories list, choose the . menu, and then choose Delete repository.

How to remove repository from github. Смотреть фото How to remove repository from github. Смотреть картинку How to remove repository from github. Картинка про How to remove repository from github. Фото How to remove repository from github

Confirm the deletion of the repository by typing the repo’s name and selecting Delete.

How to remove repository from github. Смотреть фото How to remove repository from github. Смотреть картинку How to remove repository from github. Картинка про How to remove repository from github. Фото How to remove repository from github

Select the settings icon in the web to bring up the project administration page and choose Version Control.

How to remove repository from github. Смотреть фото How to remove repository from github. Смотреть картинку How to remove repository from github. Картинка про How to remove repository from github. Фото How to remove repository from github

Select the Git repository to remove from the list shown and select the . next to the name. Choose Delete Repository.

How to remove repository from github. Смотреть фото How to remove repository from github. Смотреть картинку How to remove repository from github. Картинка про How to remove repository from github. Фото How to remove repository from github

If the Repositories pane is not expanded, select > to expand it and display the list of repositories.

How to remove repository from github. Смотреть фото How to remove repository from github. Смотреть картинку How to remove repository from github. Картинка про How to remove repository from github. Фото How to remove repository from github

Confirm the deletion of the repository by typing the repo’s name and selecting Delete.

How to remove repository from github. Смотреть фото How to remove repository from github. Смотреть картинку How to remove repository from github. Картинка про How to remove repository from github. Фото How to remove repository from github

You can use Azure DevOps CLI to delete an Azure DevOps Git repository.

Parameters

Example

Azure DevOps CLI commands aren’t supported for Azure DevOps Server on-premises.

Источники информации:

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *