Suppose I've got two local git branches I'm working on.
Branch 1 is branched off of "master", and branch 2 is branched off of branch 1 (and depends on it).
Both are works in progress, I'm not ready to push either of them yet.
While working on branch 2, I see a change I want to make, so I switch back to branch 1 and refactor it a bit, adding a new commit.
Now I want to go back to branch 2 and rebase it.
If I run git rebase branch_1 branch_2
, I get a ton of conflicts, because branch_2's history currently includes the old branch_1 commits before the refactoring, and the new refactoring in branch_1 conflicts.
Let's assume for the moment that there are no actual conflicts. If I were to create a new branch 2b, and cherry-pick all of the commits unique to branch 2 in order, they'd patch cleanly.
Is there an easy way to rebase all of the commits unique to branch_2 onto the new branch_1?