Git Autocomplete

Git Autocomplete

Step 1

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

curl -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.