I use a lot of local topic branches in git, and sometimes end up with dependencies between topic branches causing rebase problems. For example, with a structure like:
master ---> featureA ---> featureB
\--> featureC
If master changes and I get (and resolve) conflicts when rebasing featureA, then afterwards rebasing featureB onto featureA triggers the same conflicts (and sometimes exciting new ones as well) because it tries to reapply the patches from the featureA branch. Assuming that the actual patches between featureA and featureB would apply cleanly if cherry-picked, is there a way of doing a rebase in this situation with roughly the same effect as cherry-picking all of the commits between featureA and featureB?
After rebasing
featureA, you can doassuming
oldFeatureArepresents the commit at the tip offeatureAbefore you rebased it (you can either keep another branch there or just remember the commit hash).This should basically be the same as cherry-picking each commit between A and B onto the rebased version of A.
Documentation on git-rebase (includes some helpful pictorial explanations of what happens during some more complex rebase operations)