Download the .git-prompt.sh
file from Git's repo
curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh > ~/.git-prompt.sh
Add the following to .bashrc
in your homedir, after the PATH=
definition
source ~/.git-prompt.sh