/gitwdiff

Better word-diff for git

Primary LanguageShell

gitwdiff

Better word-diff for Git and SVN.

Usage

Add everything to your $PATH. Make sure you have wdiff installed.

Use gitwdiff ... instead of git diff ....

Use svnwdiff ... instead of svn diff ....

For the best results, copy the settings from gitconfig-example to your ~/.gitconfig. After that:

  • Long lines are wrapped in the output (no horizontal scrolling in the pager).

  • The usual Git commands such as git diff, git show, and git status will use colours that are similar to the colour scheme of gitwdiff.

Git uses a pager by default. With SVN, you can try this:

svnwdiff ... | less -R

Examples

More examples at: https://github.com/suomela/gitwdiff/tree/examples/example

gitwdiff

gitwdiff]

git diff --color-words

git diff --color-words

git diff --word-diff

git diff --word-diff

Dependencies

wdiff - http://www.gnu.org/software/wdiff/

Colours

Try gitwdiff1 or gitwdiff2 for alternative colour schemes.

See http://en.wikipedia.org/wiki/ANSI_escape_code for the colour codes.