Configure Git completion on Ubuntu

Update: This can be achieved with Oh My ZSH and specifically git plugin which is going to give you same experience but much better.

Tested with Ubuntu 14.04

  • Locate your git completion script. ( In Ubuntu it’s located at /usr/share/bash-completion/completions/git )
  • Add the following to your ~/.bash
source /usr/share/bash-completion/completions/git
  • Refresh env variables source ~/.bashrc
source ~/.bashrc