jueves, 7 de enero de 2016

TIL: ediff-revision

When editing a file in some git branch I often want to take a quick look at the same file in other branch (usually master).  I always did it by
 git diff HEAD master -- file.rb 
but today I discovered there's an emacs way to do it.
 M-x ediff-revision
. it asks you for a file (defaults to the current one), and two branches. And that's it!

2 comentarios:

Anónimo dijo...

If you use magit you can also use "magit-find-file".

Raimon Grau dijo...

Aha, nice!

Indeed I use magit. Thanks for the hint!