cvs

Color highlighted diffs with git, svn and cvs

4 May, 2009 - 08:57

At first, it seemed annoying, but now I really like that git uses a pager when it has to present something (e.g. a log or a diff) that is longer than your screen. Git even provides a built in option --color to show you a diff with helpful colors. I use this option all the time and made a shortcut dic for it with the following command

git config --global alias.dic "diff --color"

Also possible is to edit your ~/.gitconfig directly so you have something like the following in there:

[alias]
        di = diff
        dic = diff --color

Now I just do

git dic

and I get a nice paged and color highlighted diff.

Read more...