I've forked a repo to create a new project. The new project is now indipendent and I want to change the base fork to the head fork when creating PRs by default, in order to avoid mistakes.
How can I do that on GitHub?
When you fork a project in order to propose changes to the original repository, you can configure Git to pull changes from the original, or upstream, repository into the local clone of your fork. On GitHub.com, navigate to the octocat/Spoon-Knife repository.
If you want to make the project your own, there are two ways to do it.
The right way:
Contact github support. This is the right way and the best way as they usually reply within hours. (Check out forks for information about forks)
The not so right way:
Create a new repository and add contents from the forked repository.
git clone --bare https://github.com/Your/<Forked Repository>.git
cd <Forked Repository>/
git push --mirror
If you want to "disassociate" your fork from the original upstream repository, so that (a) it no longer shows up as a "fork" of the upstream project and (b) pull requests will by default be against your own master rather than the upstream master, you can:
And that's it. You will no longer have the option of submitting pull requests against the upstream project, but maybe that's what you want. An alternative to the above steps would be to simply create a project with a new name, and push your code there. Leaving your forked project in place would preserve your ability to submit PRs upstream if you need to do that at some point in the future.
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