movii
12/2/2014 - 5:54 AM

OSX configure git auto completeion

OSX configure git auto completeion

###OSX configure git auto completeion

open terminal

cd ~ 
hit return(make sure you are in the home dir) then paste in
curl -OL https://github.com/git/git/raw/master/contrib/completion/git-completion.bash
hit return

Now you should still be your home dir, if not cd ~ again;

then rename the git-completion.bash make it hidden as follow:

mv ~/git-completion.bash ~/.git-completion.bash

then using vi,nano or whatever you like to make some change to our .bash_profile file:

vi .bash_profile
then paste in
if [ -f ~/.git-completion.bash ]; then
  source ~/.git-completion.bash
fi
then CTRL+X -> Y -> RETURN.