## show current git branch in bash prompt
export PS1='\[\033[01;32m\]\h\[\033[01;34m\] \w\[\033[31m\]$(__git_ps1 "(%s)") \[\033[01;34m\]$\[\033[00m\] '
add above code in ~/.bashrc at your home folder
Posted by Tushar to Tushar's deck (2013-07-29 07:41)