emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: comparing code on different branches


From: Yuri Khan
Subject: Re: comparing code on different branches
Date: Tue, 4 Jul 2017 16:30:47 +0700

On Tue, Jul 4, 2017 at 12:53 PM, Marcin Borkowski <address@hidden> wrote:

> BTW, is there a Magit way of doing this?

There is.

* M-x magit-find-file asks for a revision and a file name, and opens
what you ask for.

* In a buffer visiting a file in work tree, you can invoke M-x
magit-blob-previous and it will open a new buffer with the last
committed revision of the same file. Repeating M-x magit-blob-previous
(or pressing p) from that buffer opens the same file as of the
previous commit where it was modified. M-x magit-blob-next (or n)
travels in the other direction.

* In a buffer showing a diff, you can press RET on any source code
line and it will take you to that file at the relevant revision. (But
not in a diff to the working tree.)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]