Case in point:
I\'m a on mac with bash v3.2.17, I\'m using git installed via macports with the bash_completion variant.
When I type git checkout m<
git checkout m<
I have aliased g='git', and combined with my git aliases I type things like
$ g co
The simpler fix for my specific use case was to add a single line to git-completion.
Right below this line:
__git_complete git _git
I added this line to handle my single 'g' alias:
__git_complete g _git