Show unstaged git changes in an emacs buffer as overlay.
Emacs Lisp
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Creates a simple overlay for the current buffer that shows non-staged git chunks.

Lines around additions/deletions are shown blue, additions in green, deletions in red.

Just copy it somewhere in your load-path, or add the directory containing the git-overlay.el file with (add-to-list 'load-path "/path/to/repo/")

Then just (require 'git-overlay) and do M-x git-overlay in a buffer with a file from a git repository open.

Calling git-overlay twice will toggle the overlays on and off. If you change the buffer while the git overlays are shown they will disappear.