Harrington Web

Git Autocomplete

Monday, January 13, 2014

Step 1

Run this command to get the .git-completion.bash file downloaded to your home directory.

curl https://raw.github.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash

Step 2

Add the following code to your .bash_profile which is located in the root of your home directory.

if [ -f ~/.git-completion.bash ]; then
  . ~/.git-completion.bash

Now when you open up your shell you will be able to use the TAB key for your Git commands.

No comments :

Post a Comment