Yenya's World

Fri, 01 Apr 2011

git-diff(1) Dark Color Scheme

The default colored output of git-diff(1) and other commands is a bit ugly in my terminal with dark (green-on-black) color scheme. Here is how to fix it:

git config --global color.branch.current 'yellow bold'
git config --global color.branch.remote 'cyan bold'
git config --global 'yellow bold'
git config --global color.diff.old 'red bold'
git config --global color.diff.meta 'cyan bold'
git config --global color.diff.frag 'white bold'
git config --global color.diff.commit 'white bold'
git config --global color.status.added 'yellow bold'
git config --global color.status.changed 'cyan bold'
git config --global color.status.untracked 'red bold'

Hope this helps - I had to read the source code to find out where the color of the commit ID in git-log(1) is set. The above can at least serve as an example (after all, I don't expect you to have the same taste for colours), and for my future reference.

Section: /computers (RSS feed) | Permanent link | 0 writebacks

0 replies for this story:

Reply to this story:

URL/Email: [http://... or mailto:you@wherever] (optional)
Title: (optional)
Key image: key image (valid for an hour only)
Key value: (to verify you are not a bot)


Yenya's World: Linux and beyond - Yenya's blog.


RSS feed

Jan "Yenya" Kasprzak

The main page of this blog



Blog roll:

alphabetically :-)