I created a fork from some other users repository a long time ago. Then I made a lot of changes into my fork and re-wrote a lot of code.
Now I want to turn this fork into a repository on my account, as these two are really different I want to remove the relationship between the two. So that I can have issue tracking for this fork separately etc.
How can I do that ? I have tried looking around but did not find a good example.
You are unable to fork a repo twice on Github (as of late 2021) but if you want to build on the same repo multiple times, you can use the "Import Repository" option and feed it the URL used to clone.
The quick answer Forking creates your own copy of a repository in a remote location (for example, GitHub). Your own copy means that you will be able to contribute changes to your copy of the repository without affecting the original repository. Cloning makes a local copy of a repository, not your own copy.
A fork creates a completely independent copy of Git repository. In contrast to a fork, a Git clone creates a linked copy that will continue to synchronize with the target repository.
Just add a remote to your new host and start pushing there.
git remote add newremote [email protected]/newrepo
git push -u newremote master //the -u will set this as the default
Clearly the whole commit history from the original repo will still be there.
Then, if you like, you can also remove the reference to the original remote (this does not make any difference, but it is surely cleaner)
git remote rm origin //or whatever the original remote is named
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