Skip to content

Instantly share code, notes, and snippets.

@gnufied
Created September 23, 2013 16:02
Show Gist options
  • Save gnufied/6672781 to your computer and use it in GitHub Desktop.
Save gnufied/6672781 to your computer and use it in GitHub Desktop.
(defun git-file-history ()
(interactive)
(let (
(diff-history-buffer (get-buffer-create "*git history*"))
(d default-directory)
(old-buffer-file-name (buffer-file-name))
)
(switch-to-buffer diff-history-buffer)
(diff-mode)
(setq default-directory d)
(message old-buffer-file-name)
(start-process "githist" diff-history-buffer "git" "--no-pager" "log" "-p" old-buffer-file-name)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment