I just discovered undo-tree-mode and it's amazing. My use case is finding changes that I've made before so that I can re-apply them. However I'm having difficulty finding the changes I've made.

Is there an easy way to get output like git log -p or better git log -p --graph from this so that I could grep it? The existence of undo-tree-visualizer-toggle-diff suggests that most of the code to do this is already there.

1 Answer 1


Magit can do this. From M-x magit-status show the log by pressing l then -g to turn on the graph and -u to show the diffs / patches. Then you can search as normal with C-s etc.

  • That's pretty cool. The advantage of undo tree (and it's disadvantage) is that the 'commits' are created automatically.
    – Att Righ
    Jul 26, 2017 at 16:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.