How to rebase onto a private branch with conflicts in gerrit/git?
- by edwardmlyte
Aim: I want to rebase commit G from "bravo", onto commit F from "alpha".
From this:
G bravo
/
D--E--F alpha
/
A--B--C mainline
To this:
G bravo
/
D--E--F alpha
/
A--B--C mainline
"alpha" has been successfully rebased onto the latest mainline work. I cherry-pick "alpha" onto C. And when I cherry-pick "bravo", it comes up with all the merge conflicts. Once I fix those, if I do
commit --amend
The commit message just has all the information for alpha, whereas I'd expect the information for bravo. So I tried again after hard resetting to C, doing pull (as oppose to cherry-pick) for alpha and then pull bravo. Fixed the conflicts and just ran:
commit
The commit message just lists it as a merge and has merge information. Though the commit succeeds, I can't push this to gerrit as it says I don't have the rights to push merges. When I've read about rebase, it's always just to mainline, but I want to rebase private branches. Where am I going wrong?