if [ -r '/usr/share/bash-completion/completions/git' ]
then
  . '/usr/share/bash-completion/completions/git'
  __git_complete g __git_main
fi