I have a git repository. I edit a file from the repository in Emacs and I want to use ediff in Emacs to see the differences between the text in the buffer visiting the file and a previous commit of the same file (by default the last commit). Is this possible / easy to do?
You can run the git diff HEAD command to compare the both staged and unstaged changes with your last commit.
Magit is a complete text-based user interface to Git. It fills the glaring gap between the Git command-line interface and various GUIs, letting you perform trivial as well as elaborate version control tasks with just a couple of mnemonic key presses.
Sounds like M-x ediff-revision
is what you want. It allows you to refer to revisions using the normal syntax you use for your RCS, such as git.
I see that there's a similar question here
Git is well supported. You should be able to use the normal vc package "C-x v = vc-diff".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With