unfork a repo code example
Example 1: how to unfork a repo
Currently, 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. ...
Step 1: Go to Settings of Repo you want to un fork.
Step 2: Click Delete this Repository.
Step 3: Enter your name / Repo name.
Example 2: unfork a repository github
This method will create a new "unforked" repository while maintaining everything else (commit history, branches and tags).
How to "unfork" a project in four easy steps:
1. git clone --bare https://github.com/{username}/{repository}
2. Delete original repository in https://github.com/{username}/{repository}/settings.
3. Create new repository with the name {repository} at https://github.com/new.
4. cd {repository}.git and git push --mirror https://github.com/{username}/{repository}
And done!