Skip to content

Instantly share code, notes, and snippets.

@movii
Last active August 29, 2015 14:10
Show Gist options
  • Save movii/dde52165d86d98f7903b to your computer and use it in GitHub Desktop.
Save movii/dde52165d86d98f7903b to your computer and use it in GitHub Desktop.
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment