Travel Back and Forward in Git History
I recently discovered an extremely cool package called git-timemachine that allows you to step though the git history of the file you’re currently editing in Emacs.
Using it is pretty simple:
- visit a git-controlled file and issue
M-x git-timemachine
(or bind it to a keybinding of your choice) - use the following keys to navigate historic version of the file:
p
visit previous historic versionn
visit next historic versionw
copy the hash of the current historic versionq
exit the time machine buffer
Here you can see git-timemachine
in action:
P.S.
This package is bundled with Prelude.