How to rebase onto a private branch with conflicts in gerrit/git?
Posted
by
edwardmlyte
on Stack Overflow
See other posts from Stack Overflow
or by edwardmlyte
Published on 2012-07-11T09:12:34Z
Indexed on
2012/07/11
9:15 UTC
Read the original article
Hit count: 277
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?
© Stack Overflow or respective owner