How to install git autocomplete (Mac OSX)

So I have been on the system I have been using for almost 9 months now and only now, mainly as a result of laziness, have I finally gotten around to get git autocomplete going even though it is embarrassingly simple.

1. Download the it completion script

2. Configure your ~/.bash_profile

Then add the following to your ~/.bash_profile:

If you then close and reopen your terminal, you can simply type git chec and press tab, and you will get git checkout. Not only that but all your branches and changed files will autocomplete. It really is rather awesome and it makes my life better enough that I needed to write a post about it!


Rudi Yardley

Read more posts by this author.