If you are working mostly in linux terminal and working with Git, you know that, how usefull having Git branch name in bash prompt. By default, bash prompt is like this.

To include Git branch name in bash prompt you need to edit .bashrc file in user home directory and add these lines.
git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
export PS1="\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\W \[\033[01;33m\]\$(git_branch)\[\033[00m\]\$ "
After applying these changes, your bash prompt will show Git branch name like this.
