I am trying to figure out the best workflow for working with a fork of an existing opensource project in Github. I want to take an existing project and make significant changes to it, in this case to port it to android and add specific android only functionality. I would like to satisfy the following:
My initial thoughts are I would fork the original project then fork and rename my fork to give me the following repos:
original-author/projectA nicstrong/projectA nicstrong/projectA-android
This would allow me to work on my local repo local/projectA-android push changes to nicstrong/projectA-android. Then to update from the orginal project I could rebase nicstrong/projectA to the latest from original-author/projectA then fetch/merge from nicstrong/projectA to local/projectA-android.
My questions are:
Previously, when you forked a repository the fork name would default to the same name as the parent repository. In some cases, that wasn't ideal because you wanted the fork to have a different name. Your only option was to rename the fork after it was created.
On GitHub.com, navigate to the main page of the repository. Under your repository name, click Settings. Under the Repository Name heading, type the new name of your repository. Click Rename.
The main advantage of the Forking Workflow is that contributions can be integrated without the need for everybody to push to a single central repository. Developers push to their own server-side repositories, and only the project maintainer can push to the official repository.
1/ Yes, that seems the safest approach, as any modification you end up back-porting in nicstrong/projectA
will be in a project with the same structure as original-author/projectA
.
That means pull requests will be easier to organize, since you will be in a project mirroring the original author's project.
2/ If you have massive refactoring going on in nicstrong/projectA-android
, I would make a backport
branch, carefully merge or cherry-pick what you need from the numerous changes to the backport
branch, and then push that branch to nicstrong/projectA
.
(which means you have added nicstrong/projectA
as a remote of nicstrong/projectA-android
)
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