SOLFIND
Web Lens
Portal home

Detaching a fork - GitHub Docs

https://docs.github.com/en/pull-requests/how-tos/work-with-forks/detaching-a-fork • 156 KB fetched
Open original page


Detaching a fork - GitHub Docs Skip to main content GitHub Docs Version: Free, Pro, & Team Search or ask Copilot Search or ask Copilot Select language: current language is English Search or ask Copilot Search or ask Copilot Open menu Collapse sidebar Expand sidebar Scroll breadcrumbs left * Home * Pull requests * How-tos * Work with forks * Detach a fork Scroll breadcrumbs right Pull requests * * * Get started * About pull requests * About stacked PRs * About forks * Pull request quickstart * Stacked PRs quickstart * Review quickstart * Concepts * Write code * Help others review your changes * Give reviews * Resolve reviews * Deploy code * How-tos * Commit changes * Manage branches * Commit to PR branch from fork * Create a commit with multiple authors * Change a commit message * Compare commits * Troubleshoot commits * Create pull requests * Create a pull request * Create stacked PRs * Create a PR from a fork * Draft pull requests * Manage stacked PRs * Update the head branch * Change the base branch * Request a PR review * Stacked pull requests * Review pull requests * Check out a PR locally * Review proposed changes * Review stacked PRs * Review dependency changes * Comment on a PR * Approve PRs * View a PR review * Dismiss a PR review * Incorporate feedback * Merge and close * Resolve merge conflicts * Resolve merge conflicts in Git * Troubleshoot status checks * Troubleshoot stacked PRs * Merge a pull request * Merge PR with merge queue * Merge PR automatically * Merge stacked PRs * CI for stacked PRs * Revert a pull request * Close a pull request * Work with forks * Fork a repository * Configure a remote repository * Sync a fork * Allow changes to a branch * Detach a fork * Reference * Pull requests * Stacked pull requests * Stacked PRs CLI commands * Stacked PRs APIs and webhooks * Branches * Forks * Commits * Stacked PRs and other tools * Using query parameters to create a pull request * PR reviews * Status checks * Pull request merges * Merge conflicts * Manage and standardize pull requests * Tutorials * Stack pull requests * Roll out stacked PRs Detaching a fork Disconnect a repository from its fork network by leaving the network or creating a standalone repository through manual steps. Who can use this feature? People with admin access for a forked repository can delete the forked repository. Copy as Markdown In this article * Converting a fork into a standalone repository * Leaving the fork network * Manually leaving the fork network Converting a fork into a standalone repository To turn your fork into a standalone repository, you can leave the fork network. The new repository will no longer automatically sync with changes from the original repository. This is useful when you want to take your work in a different direction or maintain distinct versions. Warning * 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. See Troubleshooting missing contributions . * Leaving the fork network is permanent and the new repository cannot be reconnected to the fork network. Leaving the fork 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 * On GitHub, navigate to the main page of the repository. * Under your repository name, click Settings . If you cannot see the "Settings" tab, select the dropdown menu, then click Settings . * On the "General" settings page (which is selected by default), scroll down to the "Danger Zone" section, and click Leave fork network . * Read the warnings and click I have read and understand these effects . * To verify that you're detaching the correct repository, in the text box, type the name of the fork. * Click Leave fork network . While the fork is being detached, some operations will be briefly unavailable. They will become available again after the fork becomes a standalone repository. Manually leaving the fork network To turn your fork into a standalone repository, you can clone the fork and use the clone to create a new repository. Then, delete the fork to remove the connection to the original network. * Open your terminal or Git Bash. * Create a bare clone of the fork. git clone --bare https://github.com/EXAMPLE-USER/FORK.git * Delete the forked repository. See Deleting a repository . Warning Deleting a fork will permanently delete any associated pull requests and configurations. This action cannot be undone. * Create a new repository with the same name in the same location. See Creating a new repository . * Mirror-push the repository back to the same remote URL. git --git-dir FORK.git push --mirror https://github.com/EXAMPLE-USER/FORK.git * Remove the temporary local clone you created earlier. rm -rf FORK.git See our support page on forks. Back to top Help and support Was this Doc helpful? Yes No Help us make GitHub Docs great! All Docs are open source. See something that's wrong or unclear? Submit a pull request. Make a contribution Still need help? Ask the GitHub community Contact support Expert services Blog GitHub Inc. © 2026 Terms Privacy Status Pricing

Links found on this page

  1. Skip to main content [direct]
  2. GitHub Docs [direct]
  3. Pull requests [direct]
  4. How-tos [direct]
  5. Work with forks [direct]
  6. About pull requests [direct]
  7. About stacked PRs [direct]
  8. About forks [direct]
  9. Pull request quickstart [direct]
  10. Stacked PRs quickstart [direct]
  11. Review quickstart [direct]
  12. Write code [direct]
  13. Help others review your changes [direct]
  14. Give reviews [direct]
  15. Resolve reviews [direct]
  16. Deploy code [direct]
  17. Manage branches [direct]
  18. Commit to PR branch from fork [direct]
  19. Create a commit with multiple authors [direct]
  20. Change a commit message [direct]
  21. Compare commits [direct]
  22. Troubleshoot commits [direct]
  23. Create a pull request [direct]
  24. Create stacked PRs [direct]
  25. Create a PR from a fork [direct]
  26. Draft pull requests [direct]
  27. Manage stacked PRs [direct]
  28. Update the head branch [direct]
  29. Change the base branch [direct]
  30. Request a PR review [direct]
  31. Stacked pull requests [direct]
  32. Check out a PR locally [direct]
  33. Review proposed changes [direct]
  34. Review stacked PRs [direct]
  35. Review dependency changes [direct]
  36. Comment on a PR [direct]
  37. Approve PRs [direct]
  38. View a PR review [direct]
  39. Dismiss a PR review [direct]
  40. Incorporate feedback [direct]
  41. Resolve merge conflicts [direct]
  42. Resolve merge conflicts in Git [direct]
  43. Troubleshoot status checks [direct]
  44. Troubleshoot stacked PRs [direct]
  45. Merge a pull request [direct]
  46. Merge PR with merge queue [direct]
  47. Merge PR automatically [direct]
  48. Merge stacked PRs [direct]
  49. CI for stacked PRs [direct]
  50. Revert a pull request [direct]
  51. Close a pull request [direct]
  52. Fork a repository [direct]
  53. Configure a remote repository [direct]
  54. Sync a fork [direct]
  55. Allow changes to a branch [direct]
  56. Pull requests [direct]
  57. Stacked pull requests [direct]
  58. Stacked PRs CLI commands [direct]
  59. Stacked PRs APIs and webhooks [direct]
  60. Branches [direct]
  61. Forks [direct]
  62. Commits [direct]
  63. Stacked PRs and other tools [direct]
  64. Using query parameters to create a pull request [direct]
  65. PR reviews [direct]
  66. Status checks [direct]
  67. Pull request merges [direct]
  68. Merge conflicts [direct]
  69. Manage and standardize pull requests [direct]
  70. Stack pull requests [direct]
  71. Roll out stacked PRs [direct]
  72. Troubleshooting missing contributions [direct]
  73. Deleting a repository [direct]
  74. Creating a new repository [direct]
  75. our support page [direct]
  76. Make a contribution [direct]
  77. Ask the GitHub community [direct]
  78. Contact support [direct]
  79. Expert services [direct]
  80. Blog [direct]