Mike November

Phonetic alphabet for my initials, k?

Viewing entries tagged with 'git'

Some handy git config bits and pieces

Posted by Marcus Nyeholt on 11 January 2011 | 0 Comments

Tags:

Have finally updated to Ubuntu 10.10, taking the opportunity to completely clean out. Of course, this means reconfiguring everything - these two git settings are the ones that I most missed

The following adds an indication on your command-line as to the branch you are currently on. Massively helpful.


parse_git_branch() { git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' } export PS1="\[\033[00m\]\u@\h\[\033[01;34m\] \w \[\033[31m\]\$(parse_git_branch) \[\033[00m\]$\[\033[00m\] "

The next simply sets a global config for colours when doing things like diff and status


git config --global color.ui "auto"

0 comments | Read the full post