While working on a project in an Ubuntu 9.10 VM I was checking out a branch and accidentally tabbed twice. To my pleasant surprise all of my branches were listed. I quickly googled and found that this functionality has been available all along! It turns out the Ubuntu deb provides this functionality via git-completion.
In any event, if you haven’t enabled this, you should do it now. It’s increased my productivity by at least elevendy percent.
For OSX (via MacPorts):
sudo port selfupdate
sudo port install git-core +bash_completion
Then add the following to your ~/.profile:
if [ -f /opt/local/etc/bash_completion ]; then
. /opt/local/etc/bash_completion
fi
For Ubuntu:
sudo apt-get install git-completion
For Fedora:
sudo yum install bash-completion