git clone 'git://github.com/itsjeyd/git-wip-timemachine.git'
git-wip-timemachine is a modified version of
git-timemachine by Peter
Stiernström that allows you to browse
git-wip versions of files from
git-wip-timemachine is on MELPA. To
start using it, follow these steps:
If you haven't already, set up
git-wip package to your
$ git clone https://github.com/itsjeyd/git-wip
If you decide to clone to a different directory and that
directory is not part of your
exec-path in Emacs, you'll need
to add the following code to your init-file (to make sure Emacs
can find the
(add-to-list 'exec-path "/path/to/git-wip")
Add the following code to your init-file:
From now on, every time you save a file that is part of a
repository, Emacs will automatically create a WIP commit by
calling out to
git-wip for you.
git-wip-timemachine to browse through WIP
versions of a file.
Use the following keys to navigate WIP versions of the file:
If you want, you can of course bind
git-wip-timemachine to a key
sequence of your choice.
Finally, there's also
git-wip-timemachine-toggle which does exactly
what its name suggests: If the timemachine is on, calling this command
will turn it off (and vice versa).
lispy-mode interferes with the
default bindings of
git-wip-timemachine. If it is on when you start
the timemachine, it will be turned off automatically (and become
active again when you exit the timemachine).
If you use
magit, you might be
interested in having your WIP commits listed in the
buffer. Follow these steps to do this interactively:
Hit l to bring up the menu for logging.
-al to enable the
Hit l (or L, if you want to see stats as well).
If you want to enable the
--all switch by default, you can add the
following code to your init-file:
(defun magit-log-all ()
(magit-key-mode-toggle-option 'logging "--all"))
(define-key magit-mode-map (kbd "l") 'magit-log-all)
Note that while
git-wip-timemachine only considers WIP commits that
introduce changes to the file it was called from,
magit will show
all WIP commits by default (irrespective of the file(s) they touch).