Skip to content

Commit

Permalink
Add restore deleted repo in GHES
Browse files Browse the repository at this point in the history
  • Loading branch information
vgrl authored Oct 26, 2021
1 parent c9dc066 commit c82917f
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ children:
- /configuring-git-large-file-storage-for-your-enterprise
- /migrating-to-internal-repositories
- /disabling-git-ssh-access-on-your-enterprise
- /restoring-a-deleted-repository
- /troubleshooting-service-hooks
shortTitle: Manage repositories
---
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
title: Restoring a deleted repository
intro: Site administrators can restore deleted repositories to recover their contents.
versions:
ghes: '*'
ghae: '*'
topics:
- Enterprise
- Privacy
- Repositories
shortTitle: Restore a deleted repository
---
Usually, if someone deletes a repository, it will be available on disk for 90 days and can be restored via the site admin dashboard. Unless a legal hold is in effect on a user or organization, after 90 days the repository is purged and deleted forever.

## About repository restoration

If a repository was part of a fork network when it was deleted, the restored repository will be detached from the original fork network.

It can take up to an hour after a repository is deleted before that repository is available for restoration.

Restoring a repository will not restore release attachments or team permissions. Issues that are restored will not be labeled.

## Restoring a deleted repository

{% data reusables.enterprise_site_admin_settings.access-settings %}
{% data reusables.enterprise_site_admin_settings.search-user-or-org %}
{% data reusables.enterprise_site_admin_settings.click-user-or-org %}
1. In the {% octicon "repo" aria-label="The repo icon" %} **Repositories** section, click the {% octicon "trash" aria-label="The trash icon" %} **Deleted repositories** link.
1. Find the repository you want to restore in the deleted repositories list, then to the right of the repository name click **Restore**.
1. To confirm you would like to restore the named repository, click **Restore**.

## Further reading

- "[Placing a legal hold on a user or organization](/admin/user-management/managing-users-in-your-enterprise/placing-a-legal-hold-on-a-user-or-organization)"
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,11 @@ topics:
**Warnings**:

- Deleting a repository will **permanently** delete release attachments and team permissions. This action **cannot** be undone.
- Deleting a private {% ifversion ghes or fpt or ghae or ghec %}or internal {% endif %}repository will delete all forks of the repository.
- Deleting a private or internal repository will delete all forks of the repository.

{% endwarning %}

{% ifversion fpt or ghec %}
You can restore some deleted repositories within 90 days. For more information, see "[Restoring a deleted repository](/articles/restoring-a-deleted-repository)."
{% endif %}
Some deleted repositories can be restored within 90 days of deletion. {% ifversion ghes or ghae %}Your site administrator may be able to restore a deleted repository for you. For more information, see "[Restoring a deleted repository](/admin/user-management/managing-repositories-in-your-enterprise/restoring-a-deleted-repository)." {% else %}For more information, see "[Restoring a deleted repository](/articles/restoring-a-deleted-repository)."{% endif %}

{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.sidebar-settings %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@ redirect_from:
versions:
fpt: '*'
ghec: '*'
ghes: '*'
ghae: '*'
topics:
- Repositories
shortTitle: Restore deleted repository
---
{% ifversion fpt or ghec %}
Anyone can restore deleted repositories that were owned by their own user account. Organization owners can restore deleted repositories that were owned by the organization.

## About repository restoration
Expand Down Expand Up @@ -44,3 +47,7 @@ Restoring a repository will not restore release attachments or team permissions.
## Further reading

- "[Deleting a repository](/articles/deleting-a-repository)"

{% else %}
Usually, deleted repositories can be restored within 90 days by a {% data variables.product.prodname_enterprise %} site administrator. For more information, see "[Restoring a deleted repository](/admin/user-management/managing-repositories-in-your-enterprise/restoring-a-deleted-repository)."
{% endif %}

0 comments on commit c82917f

Please sign in to comment.