Looking at the git-rebase
man page, I didn't see any diagrams that looked like what I want (except some seem to do the reverse of what I want), and playing around with --onto
didn't get me what I wanted either.
Let me see if I can draw a diagram like the ones from the git-rebase
man page (the vertical bars to the left are to make Markdown format it correctly):
| o-o-o-o-branch2
| /
| -o-o-A-master-o-branch1-o-o-my_WIP_branch
branch1
is probably not actually important here, but I included it anyway. What I want to do is get this (omitting the '
s that that usually accompany the git-rebase
man page diagrams):
| o-o-o-o-branch2-o-branch1-o-o-my_WIP_branch
| /
|-o-o-A-master
Basically, I want to put my my_WIP_branch
work over the branch2
work without having to deal with merge conflicts involved in the group of commits labeled A
. Is there any way to do this other than manually cherry-picking each commit over branch2
(or at least is there maybe an easy way to do that?)? By the way, there will be merge conflicts, so ideally it should be a git command or group of git commands that handle those gracefully (e.g., git rebase
handles them gracefully, git am
and git apply
do not).