I have been working on a branch new_feature:
A -- B -- C -- D master \ \ \ 1 -- 2 -- 3 new_feature \ E -- F -- G port Our code base also has an older branch port where another developer ported our product to another RDBMS. port is not yet ready to be merged back into master.
Recently it became necessary to have new_feature work in port. So I merged those two into a new branch port/new_feature, and made some commits there (I, J) to get it working:
A -- B -- C -- D master \ \ \ 1 -- 2 -- 3 -- I* -- J* -- K new_feature \ \ E -- F -- G -- H -- I -- J -- K* port/new_feature port I cherry-picked I and J back into new_feature (as I*, J*) because they involved significant refactoring that I wanted to have in new_feature too. I have also been making new commits (K) to new_feature that need to be brought over to port/new_feature (K*).
Going forward, what's the best plan to keep new_feature and port/new_feature in sync (but only with respect to new changes)? Should I keep cherry-picking commits from one to the other (and vice versa)? Or is there a convenient way to do this by merging?