1
0
mirror of synced 2025-12-19 18:10:59 -05:00

Update detaching-a-fork.md (#53942)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
Co-authored-by: Sophie <29382425+sophietheking@users.noreply.github.com>
Co-authored-by: Zachariah Cox <zachariahcox@github.com>
This commit is contained in:
Patrick Knight
2025-02-10 09:42:44 -06:00
committed by GitHub
parent be1fbaad82
commit e154a557a8

View File

@@ -1,6 +1,6 @@
--- ---
title: Detaching a fork title: Detaching a fork
intro: You can delete a fork and recreate the same repository, without the connection to the original network. intro: You can disconnect a repository from its fork network by leaving the network or manually deleting the fork and recreating it without any connection to the original.
versions: versions:
fpt: '*' fpt: '*'
ghes: '*' ghes: '*'
@@ -10,15 +10,14 @@ topics:
permissions: People with admin access for a forked repository can delete the forked repository. permissions: People with admin access for a forked repository can delete the forked repository.
--- ---
## About detaching forks ## Converting a fork into a standalone repository
To turn your fork into a standalone repository, you can clone the fork, use the clone to create a new repository, and then delete the fork. This is useful when you want to take the work you are doing in a different direction or maintain distinct versions. To turn your fork into a standalone repository, you can leave the fork network ensuring the new repository will no longer automatically sync with changes from the original repository. This is useful when you want to take the work you are doing in a different direction or maintain distinct versions.
The new repository will no longer automatically sync with changes from the original repository. > [!WARNING]
> [!NOTE]
> * The new repository will not retain any of its issues, pull requests, wikis, stars, watchers, comments, child forks, or other metadata that may currently be associated with your current fork. > * The new repository will not retain any of its issues, pull requests, wikis, stars, watchers, comments, child forks, or other metadata that may currently be associated with your current fork.
> * All git commit metadata will be preserved. Commits may become eligible to be counted as contributions if they meet certain criteria. For more information, see [AUTOTITLE](/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-settings-on-your-profile/why-are-my-contributions-not-showing-up-on-my-profile#your-local-git-commit-email-isnt-connected-to-your-account). > * All git commit metadata will be preserved. Commits may become eligible to be counted as contributions if they meet certain criteria. For more information, see [AUTOTITLE](/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-settings-on-your-profile/why-are-my-contributions-not-showing-up-on-my-profile#your-local-git-commit-email-isnt-connected-to-your-account).
> * Leaving the fork network is **permanent** and the new repository **cannot** be reconnected to the fork network.
{% ifversion ghes %} {% ifversion ghes %}
@@ -27,9 +26,25 @@ The new repository will no longer automatically sync with changes from the origi
{% endif %} {% endif %}
## Detaching a fork ## Leaving the fork network
You can delete a fork and recreate the same repository, without the connection to the original network. You can only detach forks with the leave network option when:
* The fork is public
* The fork is less than 1GB
* The fork does not have any child forks attached
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.sidebar-settings %}
1. On the "General" settings page (which is selected by default), scroll down to the "Danger Zone" section, and click **Leave fork network**.
1. Read the warnings and click **I have read and understand these effects**.
1. To verify that you're deleting the correct repository, in the text box, type the name of the fork.
1. Click **Leave fork network**.
While the fork is being detached, some operations will be briefly unavailable until the fork has been transitioned to a standalone repository.
## Manually Leaving the fork network
To turn your fork into a standalone repository, you can clone the fork, use the clone to create a new repository, and then delete the fork removing the connection to the original network.
{% data reusables.command_line.open_the_multi_os_terminal %} {% data reusables.command_line.open_the_multi_os_terminal %}
1. Create a bare clone of the fork. 1. Create a bare clone of the fork.