#Set It Up
- Install bash-completion
Mac OS X:
brew install bash-completion git
Ubuntu/Debian:
sudo apt-get install git bash-completion
Install instructions for other systems may be found here: https://github.com/bobthecow/git-flow-completion/wiki/Install-Bash-git-completion#ubuntudebian
- Modify your
.bash_profile
(replace subl with your text editor or nano)
subl ~/.bash_profile
-
Paste the contents of
.bash_profile
the previous shell script into your.bash_profile
-
Source your bash profile
source ~/.bash_profile
- Profit $.
###In Case of error
If you receive the error: -bash: __git_ps1: command not found
Place this line at the top of your .bash_profile
source '/usr/local/etc/bash_completion.d/git-prompt.sh'
Save it and run source ~/.bash_profile
again.