TL;DR: 2 steps: Rename the repository. Import the renamed repository under the original name.
Sometimes a repository on GitHub started off as a fork.
You now want to break that connection.
Forks on GitHub come with a few special behaviours, like the issues tab not being enabled by default.
1. Rename your repository on GitHub
Go to the repository on GitHub, find the Settings page and rename your repository. (Don't worry, you'll get to keep the original name.)
This freshly renamed repository is still marked as a fork!
2. Import the repository
GitHub provides a way to import repositories.
Grab the link to clone the repository you just renamed and enter it.
NOTE: Provide the https link, the SSH one won't work
For the name, enter the original name of your repository.
After a while the "new" repository will be ready.
If there is an e-mail address linked to that GitHub account, an e-mail will also notify you of success.
Enjoy your unforked repository
The git history is still there. đź‘Ť
The locally cloned project does not have to be touched.
Pushing a change should work without intervention, since the remote url is the same as before.
Since this is technically a brand new repository, some things (specific to the GitHub web UI) were lost.
For example: pull requests, a description, the provided website url.
Top comments (3)
I have seen people create a copy that wasn't a fork before. I have a question though: if the project is going to have the exact same name, what are some reasons to break the "fork" connection between your fork and the original?
If the connection as fork no longer makes sense.
The example used in this post started as a fork from an example repo.
It was great to get started, but the connection no longer makes sense. No pull requests from my fork to that original example repository would be logical.
It can make extra contributions harder.
If anyone wanted to fork, (and contribute to)
gatsby-theme-nicky-blog
while it was still marked as a fork of that example repo. GitHub wouldn't let them do that if they forked that example repo as well.I did this and my codes were not imported into the new repo