1

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?

CIsForCookies
  • 12,097
  • 11
  • 59
  • 124
  • I doubt 1417 and 738 are the numbers of branches. I rather thing these are counts of local files tab completion is trying to complete. – phd Jan 29 '19 at 13:12
  • 1
    After the linked answer there is a comment "*Sadly creating an alias which uses this option internally does not seem to work. Only providing the option directly on the CLI results in only local branch completion.*" – phd Jan 29 '19 at 13:13
  • Didnt see that comment. Nevertheless aliases such as `git branch -d` do work for me so this is puzzeling – CIsForCookies Jan 29 '19 at 13:14
  • 1
    Tab completion works for me in aliases, even in aliases with shell functions. This one seems to be a bug in git. – phd Jan 29 '19 at 13:15

1 Answers1

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.