I have a feature branch that I want to interactively rebase on master, like:
A - B - C - D (master)
\
E - F (feature)
The desired result is
A - B - C - D (master) - E - F (feature)
with some sanity-check scripts running after E and F (using exec lines on the rebase-todo file).
However, if I go to magit's log buffer and type r e
with the point on commit D
, magit performs a git rebase -i D^
instead of git rebase -i D
, so the feature's commits are replayed from C
. What I want is to rebase onto the tip of master, not onto master^.
So:
- Is there a way to force magit to base the interactive rebase on
D
, where I'm pointing at in the log buffer, and not on the parent of where I'm pointing? - magit doesn't seem to do this automatic appending of ^ in non-interactive rebases. Why the discrepancy? Is cross-branch interactive rebase somehow a bad idea?
BTW, I know there are workarounds: I can drop down to the command line; I can split this into an intra-branch interactive rebase followed by a non-interactive one; or I can do a dummy commit on master. None of them is very convenient. What I'd like to know is if there's a way to do it in one step, or if not, whether there's some wisdom behind it that I should know about.