I tried adding the git branch I\'m currently working on (checked-out) on the bash prompt without success.. (while keeping my current path which shows the active dir
1- If you don't have bash-completion ... : sudo apt-get install bash-completion
2- Edit your .bashrc file and check (or add) :
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
3- ... before your prompt line : export PS1='$(__git_ps1) \w\$ '
(__git_ps1 will show your git branch)
4- do source .bashrc
EDIT :
Further readings : Don’t Reinvent the Wheel