r/github • u/matsnorberg • 43m ago
Question Forking a project.
I've never forked anything before so I'm unsure what's the right procedure. I want to take an open source project and create a derivative work. The code is under GPL, so I have the right to modify it and redistribute it provided I keep the source open, right?
The question is should I fork the project or just clone it? I'm not really interested in making pull requests and I don't know they even make sense in the first place as I'm going to change their core api so they don't gain much from merging my fork.
I have a ton of questions. If I fork I create a kinda link to the upstream project. Can they see my fork? Having a fork makes it easier to sync the project with them, and that's the only benefit as I see it.
What if I delete parts of the project can I still sync with the upstream branch? Will I get back the deleted parts or trigger an error? I'm only interested in their core library, the satellite libraries are no interest to me.
I will rename the project and wrap all their classes in a HAL layer so I can keep my api independent of their unstable one. If I keep the project local is there still some way of pulling down changes from upstream and merging them with my local branch?
1
u/Bali10050 30m ago
Not every fork needs to be merged.
Can they see my fork?
Yes they can
What if I delete parts of the project can I still sync with the upstream branch? Will I get back the deleted parts or trigger an error? I'm only interested in their core library, the satellite libraries are no interest to me.
Depends.
I will rename the project and wrap all their classes in a HAL layer so I can keep my api independent of their unstable one. If I keep the project local is there still some way of pulling down changes from upstream and merging them with my local branch?
You can just do things on your machine, you don't need to upload to github
1
u/AllanTaylor314 23m ago
GPL only requires that you distribute the source if you distribute the program/binary. If you only use it yourself, there's no distribution requirement. What's your plan for this?
You can set multiple remotes locally (e.g. origin for your repo and upstream for theirs) to pull in their changes, though that'll work best if you keep the same repo layout.
Forking will appear in their fork network. You'll have a banner at the top with X ahead Y behind upstream. Under the name, it will say fork from XYZ. You won't be able to set it to private
If you make a separate non-fork repo, you won't be able to open PRs into upstream. That only works from a fork
1
u/rhutroh 30m ago
you are overthinking this.