Turns out it’s possible to enable autocompletion of git branch names when working on the command line. The script can be automatically installed on OS X using these commands:
$ curl -G https://raw.github.com/git/git/master/contrib/completion/git-completion.bash > ~/.git-completion.sh $ echo 'source ~/.git-completion.sh' >> ~/.bash_profile
Don’t forget to re-open any already open Terminal windows.
UPDATE: I’ve been notified that this script also autocompletes names of remotes and the like 🙂