Search code examples
gitgit-checkouttab-completion

clean git checkout autocompeletion


I'm using git with zsh

when I type in 'gco' and press the 'tab' key, it will be like the following

enter image description here

Those are not deleted or merged branches, but I don't want them.

Especially something like

7038cc34 -- [HEAD]


Solution

  • Make sure to use the latest Git 2.13, which improved on Git completion:

    In your case, check the git branch -avv output to see if those "branches" are listed at all. If not, it could be a new bug to report to the mailing list.