how to un fork the github repository?

Github

Github Problem Overview


How to un fork a github repository?

I have never seen unfork option anybody knows how to do that?

Github Solutions


Solution 1 - Github

Update: There's now an automated solution

See https://stackoverflow.com/a/66470086/151312

Original Post

As of now Github doesn't have an unfork option, so the only solution is to delete the forked repo.

>Warning: The following solution will delete your cloned repo. If you want unfork without your repo is being deleted try this https://stackoverflow.com/a/41486339/6335029

Step 1: Goto Settings of Repo you want to unfork

Step 2: Click Delete this Repository enter image description here

Step 3: Enter your name / Repo name

Step 4: click "I understand the consequences, delete this repository" button

enter image description here

Solution 2 - Github

GitHub support can do this for you.

  1. Go to this link https://support.github.com/contact?tags=rr-forks
  2. Type in "unfork"
  3. Let the virtual assistant help you

They completed the process for me within 1 minute after that.

Solution 3 - Github

Option 1: Rename, import, delete
  1. Rename your old fork (e.g. repo.old)

  2. Import your old fork as a new repo (Note: provide the https:// or git:// URI of the old fork)

  3. Delete / archive the old fork

Note: the "import" option is an option when creating stuff:

Option 2: Clone, delete, create, push
  1. Back up your repo! E.g. git clone to your local file system.
  2. Delete the original repo from GitHub (See the other answer...)
  3. Create a new repo with the same name
  4. Push your local backup to the new GitHub repo

I recommend option 1.

Whatever you do, back up your work! Especially if you follow the other answer, which just tells you to delete your repo...

Solution 4 - Github

There isn't a way to do it via the web portal (without cloning/deleting the repo as described in other responses). I put in a request to GitHub support, asking them to convert the repository to 'normal mode', and they did it within five minutes.

Solution 5 - Github

You can always send in a ticket and have GH support detach it from the fork network for you. That way you keep the followers, issues, etc.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionMike TavishView Question on Stackoverflow
Solution 1 - GithubNaveen DAView Answer on Stackoverflow
Solution 2 - Githubbones225View Answer on Stackoverflow
Solution 3 - Githubwilliam_grisaitisView Answer on Stackoverflow
Solution 4 - GithubLukeView Answer on Stackoverflow
Solution 5 - Githubuser14702727View Answer on Stackoverflow