git-difftool

From: David Aguilar <hidden>
Date: 2016-06-15 22:45:49

Several co-workers have found this script useful.
It's basically git-mergetool modified to operate on the git
index/worktree.  There's some things about the script that
aren't very gitish (for example, the way revargs are
processed) but it's useful nonetheless.

The usual use case for this script is when you have either
staged or unstaged changes and you'd like to see the changes
in a side-by-side diff viewer (e.g. xxdiff, tkdiff, etc).

	git difftool [<filename>*]

Another use case is when you'd like to see the same
information but are comparing arbitrary commits
(this is the part where the revarg parsing could be better)

	git difftool --start=HEAD^ --end=HEAD [-- <filename>*]

The last use case is when you'd like to compare your current
worktree to something other than HEAD (e.g. a tag)

	git difftool --commit=v1.0.0 [-- <filename>*]

It's a generally useful script so I thought I'd share it here.
If others find it useful then maybe we can fix it up and ship
it along with the other useful goodies in contrib/.


enjoy,

-- 

	David

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help