brew install bash-completion
Then, as usual, homebrew tells you exactly what you have to do. Just add this to .bashrc:
if [ -f $(brew --prefix)/etc/bash_completion ]; then . $(brew --prefix)/etc/bash_completion fi
Now you get fancy completion. Here's me hitting tab twice with a git command:
$ git checkout rdiankov rdiankov-master rdiankov/animation rdiankov/animation2 rdiankov/collada15spec rdiankov/master rdiankov/pypy
Awesome.