$ brew install moreutils
$ brew install git bash-completion
$ vi $HOME/.bash_profile
# maybe this works:
source /Library/Developer/CommandLineTools/usr/share/git-core/git-completion.bash
source /Library/Developer/CommandLineTools/usr/share/git-core/git-prompt.sh
# and maybe that here:
source /usr/local/git/contrib/completion/git-completion.bash
source /usr/local/git/contrib/completion/git-prompt.sh
# maybe here:
source /usr/share/git-core/contrib/completion/git-prompt.sh
PS1="${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\[\033[31m\]\$(__git_ps1)\[\033[00m\]$ "
GIT_PS1_SHOWDIRTYSTATE=true