Ubuntu 12.04 git auto-complete not working (Solved)

August 6th 2013

I encountered a very strange problem a second ago with a new install of Ubuntu.

My git commands weren't auto-completing (which sucks when you're used to having them).

Anyway, after some playing I've cracked it. Here's how you can enable the auto-complete for git commands in the terminal.

Text Snippet:
$ nano ~/.bashrc

Navigate to the bottom of the file and add this line

Text Snippet:
source /etc/bash_completion.d/git

We've added the core bits here. To refresh the changes (on the fly) type the following into the terminal:

Text Snippet:
$ source ~/.bashrc

Now, exit your terminal and go back in. Try typing:

Text Snippet:
git checko

And now, press tab :) Done.