Question

I want to take an open source project (A) from GitHub, fork it to my account and then make some modifications (B).

Then after a while, there will be changes on the original (A) repository and at the same time I did changes on my repository (B)

The question is: is there a way then to maintain or merge from repo (A) to repo (B) ?

and the other question is: is a good idea? I know it depends on what type of changes I make to the source code, but is this a good practice, or usually when there is forking, projects go in very different ways ?

Thanks

Was it helpful?

Solution

You can add the repository you forked from as a remote

git remote add upstream PATH_TO_REPO

Then you can just

get fetch upstream
git merge upstream/BRANCH_NAME
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top