I'm planning to add some code based on a project on github, e.g. add some customerized options that fit my project.
One idea is to fork and create a branch to include all my changes. Every time upstream has new changes, I fetch and rebase them to my branch.
Suppose these are my remotes:
$ git remote -v
my git@github.com:khing/myproject.git (fetch)
my git@github.com:khing/pyproject.git (push)
up https://github.com/upstream/project.git (fetch)
up https://github.com/upstream/project.git (push)
upstream has three commits: A, B, C, and I have two extra commits: M, N
So I guess current branches will be like:
up: A--B--C
my: A--B--C--M--N
Suppose upstream has two new commits D and E, I should fetch and rebase (and yes, I might have to fix merge conflicts), so I guess it will be:
up: A--B--C--D--E
my: A--B--C--D--E--M--N
Is this a good way maintaining my own branch while keeping up-to-date with an upstream branch?