'no tab completion when using git checkout alias

I'm using this answer on "how to disable git checkout auto-complete" (specifaclly, using the --no-guess part, as the export didn't seem to work.)

I have a .gitconfig file with the following entry:

[alias]
    co = checkout

and so, when I use git co it works ok:

git co <TAB>
Display all 1417 possibilities? (y or n)

and when using git co --no-guess :

git co <TAB>
Display all 738 possibilities? (y or n)
  1. Does that mean I already have 738 local branches? If so, how can I remove unwanted branches from?
  2. when changing the alias in my .gitconfig to co = checkout --no-guess it continues to work as before (i.e. only adding '--no-guess' explicitly after git co does the trick. why is that?

Seems to be a git bug... is it?



Solution 1:[1]

It means you have 738 "things". A thing can be a local branches (unlikely - check with git branch), or a tag which is much more likely. Hopefully you have a naming convention which allows you to distinguish branches and tags, and the distinguishing feature is a prefix not a suffix. Type enough of a prefix to limit to branches.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Martin Bonner supports Monica