How does one ediff a current file--ie working tree--against an arbitrary version in some previous commit?
In this case, I'm interested in pulling in some, but not all, changes from a commit in another feature branch that was rejected.
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.
Sign up to join this communityI can't think of a one-step way to do this. The best I can come up with is
Type dr (magit-diff
), and set the range to the commit
If point is on the commit, you can copy it with C-w before calling dr.
In the diff buffer, go to the file you want and hit e
(magit-ediff-dwim
)
Though you might consider doing away with the ediff step. You can hit v to reverse a hunk at point in the working tree.
C-x l
from the magit-diff
transient state to enable the -R
option that reverses old and new, so that you get the diff in the order you want if you're pulling in changes selectively.
Aug 30 at 14:53