to show the git branch on the command promt set the PS1 var in .bashrc or .profile like this:
PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\e[0m\]\[\e[31m\]$(git branch 2>/dev/null|fgrep '\''*'\''|sed '\''s/$/)/;s/^* / (/'\'')\[\e[0m\]$ '
no comments | tags: git | posted in Source Version Control