I am reasonably new to Git and recently forked a project from GitHub, made some changes and submitted a pull request back to GutHub.
The changes that I made I am now using in an application that I am developing, so I need to have those locally in order for my application to run.
I do however want to continue adding features/changes to the GitHub project by forking another branch and doing the changes there and subsequently doing another pull request and so on and so forth.
Is there a way to keep the changes that I made in the first fork (before and if they are merged into the master by project developers) and continue to add features to the second fork and then doing the second pull request which would contain only the changes in the second fork for the purpose of the pull request. The process would then repeat for the third and subsequent forks.
However locally I would have all the changes from the first fork onwards so that I can continue testing my application against all the latest changes that I am making.
If you have two branches, lets call them
first-fork(which you’ve already submitted a pull request for), andsecond-fork(which has some other things in it, submitted upstream or not), what you want to do is keep them distinct, to ease the upstream pulls. What I would do is have a third local branch, saybuild, to be the version of the software that you’re building and running, which you can mergefirst-forkinto, and then repeatedly mergesecond-forkinto as you add new things that you want to try.