/ git

Git-aware prompt

Have a git-aware prompt on Ubuntu.
If you are inside of a git folder you will see for instance the (branch) and if it's dirty or not.

Or simply do the following:

Edit ~/.bash_profile

Add the following lines:

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

Either logout and login again.... Or
source ~/.bash_profile