2

I am seeing a weird bug/feature in Mac Terminal. When I type Git Checkout followed by a tab then it shows me a huge list of branches(Couple of hundred branches) and I was a little confused looking a such a huge list. But when I paid more attention to it, it turned out that it is a list which contains all the branches ever created on this repo including remote branches ever pulled. This is not necessarily an error or doesnt stop me from working efficiently but it is a little annoyance.

I am just wondering if there is anyway to clean this list up?

Lost
  • 12,007
  • 32
  • 121
  • 193

1 Answers1

3

Can you try the same completion after typinf first:

export GIT_COMPLETION_CHECKOUT_NO_GUESS=1

With Git 2.13 or more, that should avoid displaying all the remote branches.
See more at "Disable auto-completion of remote branches in Git Bash?".

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250