Get – Git Completion Bash

Put in ~/.bashrc
source ~/.git-completion.sh
export PS1='[\[email protected]\h \W$(__git_ps1 " (%s)")]\$ '