I spent an hour playing around with my bash PS1 setting. I wanted some useful information about which git branch I am on, and some colors.
After reading a couple of articles on it like this one and this one I tried it a bit myself and ended up with this:
Here is the PS1 code:
PS1_END_SIGN=
export PS1=' \[\e[1;36m\]$(git branch &>/dev/null; if [ $? -eq 0 ]; then echo " ($(git branch | grep '^*' |sed s/\*\ //))"; fi) \[\e[1;37m\] $PS1_END_SIGN \[\e[00m\] '
The PS1_END_SIGN can be set to anything you want. The PS1 setting includes some coloring and output of the current branch if you are in a git repository.