Step 1: Download and Move These Files To Home Directory

git-completion.bash

git-prompt.sh

mv git-completion.bash ~
mv git-prompt.sh ~

Step 2: Add Code To Your ~/.bash_profile

# Enable tab completion
source ~/git-completion.bash

# Change command prompt
source ~/git-prompt.sh

# colors!
red="\[\033[38;5;203m\]"
green="\[\033[38;05;38m\]"
blue="\[\033[0;34m\]"
reset="\[\033[0m\]"

export GIT_PS1_SHOWDIRTYSTATE=1

# '\u' adds the name of the current user to the prompt
# '\$(__git_ps1)' adds git-related stuff
# '\W' adds the name of the current directory
export PS1="$red\u$green\$(__git_ps1)$blue \W
$ $reset"

Step 3: Restart Terminal