0

There is any command/package that allows me to move back and forth through the vc history of a file, updating the buffer to display the previous/next revision of that file?

Let's say I have a file with 3 commits/versions, and I'm viewing the current "version 3" of the file. Then using the go-back and go-fwd commands should work like this:

  • go-back -> update buffer with version 2
  • go-back -> update buffer with version 1
  • go-fwd -> update buffer with version 2

etc...

phils
  • 50,977
  • 3
  • 79
  • 122
Math
  • 103
  • 2
  • 1
    Please write more clearly, without using needless abbreviations or meaningless phrases like "between the git log" (between the git log and what? Did you even mean the git log?!). – phils Dec 12 '23 at 06:26
  • feels hard to be more clear. between versions. btw 1 & 2 , 2 & 3 etc – Math Dec 12 '23 at 20:40
  • 1
    Then please compare https://emacs.stackexchange.com/posts/79784/revisions for future reference. Clarity is everything when you're asking questions. You should want to ensure that your question is as easily-comprehensible as possible. – phils Dec 12 '23 at 23:15

1 Answers1

1

You can give git-timemachine a try.

According to the Commentary section of the package it may do what you are after:

;;; Use git-timemachine to browse historic versions of a file with p
;;; (previous) and n (next).
Manuel Uberti
  • 3,250
  • 19
  • 37