I would like to "unfork" a GitHub fork without deleting + recreating it. Is this possible?
My reason is that my project now has a completely different use to the source of the fork, and makes no sense to be showing number of commits ahead, or the pull request button (or at least, with such prominence). With hindsight, I think I would have just git clone
d the original, rather than made a fork.
I would like to not delete my fork in order to keep the issues + history of pull requests made.
I am happy to keep the history of commits, it's just the removal of the fork status that I'm after.
Also note that if you are deleting a forked repository, deleting it will only remove it (including any changes you have made to it) from your own GitHub - you won't accidentally delete the original project (phew).
If the original repository is deleted, the fork remains.
Na, na. Github is far more powerful than you think.
Undoubtedly, there's no way but make a bare copy of all of the codes. However, the copy procedure can be done by Github itself. So, no pain of mirroring the code with our own bandwidth.
Step by step:
Done. Github will even give you an email notification when copy'n'paste is done.
Tested to work against my own project. Good feature isn't it?
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:
git clone --bare https://github.com/{username}/{repository}
https://github.com/{username}/{repository}
/settings.{repository}
at https://github.com/new.cd {repository}.git
and git push --mirror https://github.com/{username}/{repository}
And done!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With