colorize git

0 views
Skip to first unread message

Dinesh Raju

unread,
Nov 16, 2009, 11:23:38 AM11/16/09
to Singapore Ruby Brigade
Hi,

The commands to colorize git that were mentioned in the SRB are:

git config --global color.branch "auto"
git config --global color.status "auto"
git config --global color.diff "auto"

You can further customize the colors with specific values that can be
found here : http://cheat.errtheblog.com/s/git

There is also some good information about git gc and fsck here:
http://www.kernel.org/pub/software/scm/git/docs/everyday.html



Dinesh

Jason Ong

unread,
Nov 16, 2009, 8:03:36 PM11/16/09
to singap...@googlegroups.com
Thanks Dinesh!
--
Cheers,
JasonOng

---
twitter: @jasonong
friendfeed: jasonong
facebook: velvetpd

Ohad Levy

unread,
Nov 16, 2009, 8:53:27 PM11/16/09
to singap...@googlegroups.com
Another thing worth mentioning is the bash prompt and auto complete features.

e.g. git che<tab> (for checkout) mas<tab> (for master branch)

what I do in my bashrc:

# Define some colors:
BLUE="\[\033[0;34m\]"
LIGHT_GRAY="\[\033[0;37m\]"
LIGHT_GREEN="\[\033[1;32m\]"
LIGHT_BLUE="\[\033[1;34m\]"
LIGHT_CYAN="\[\033[1;36m\]"
YELLOW="\[\033[1;33m\]"
WHITE="\[\033[1;37m\]"
RED="\[\033[1;31m\]"
LIGHT_RED="\[\033[0;31m\]"
CYAN='\e[1;36m'

NO_COLOR="\[\033[0m\]"


if [ -r /etc/bash_completion.d/git ]; then
    . /etc/bash_completion.d/git
    PS1="${RED}\u${LIGHT_GREEN}@${YELLOW}\h${LIGHT_GREEN}:${NO_COLOR}$NEWPWD$(__git_ps1 "(%s)")${WHITE}\$ ${NO_COLOR}"
else
    PS1="${RED}\u${LIGHT_GREEN}@${YELLOW}\h${LIGHT_GREEN}:${NO_COLOR}$NEWPWD${WHITE}\$ ${NO_COLOR}"
fi

cheers,
Ohad

On Tue, Nov 17, 2009 at 12:23 AM, Dinesh Raju <din...@dineshraju.com> wrote:
Reply all
Reply to author
Forward
0 new messages