Git tab autocomplete on OSX 10.11 El Capitan

By | January 6, 2016

In Ubuntu, this comes out of the box but in terminal on OSX a few extra steps are required to get this to work. It is a bit of a hassle figuring out what needs to be done, but once you know, it literally takes 10 seconds.

Step 1: Download auto completion script:

>> cd ~
>> curl -O

This downloads the auto completion script.

Step 2: Update .bash_profile

>> echo "source ~/git-completion.bash" >> .bash_profile

This adds an extra line into your .bash_profile

That is it! Easy as.


  • You may need to restart terminal.
  • You want to curl the “raw” version of this file: so add raw as a subdomain (….) and you’ll see the redirect.
  • The -O flag in curl means to download it as a file. Otherwise you’ll see the file echoed out in the terminal.



3 thoughts on “Git tab autocomplete on OSX 10.11 El Capitan

  1. Pingback: Homebrew’s `git` not using completion - iZZiSwift

Leave a Reply

Your email address will not be published. Required fields are marked *