What is the most appropriate way to remove an already deleted branch from the tab completion history?

advertisements

I can't exactly remember the events that led me to my current scenario, but it happened something similar to this:

  • had a branch named 2-dev-inprogress
  • changed branch name of 2-dev-inprogress to 2-dev-wip using:
    • git branch -mv 2-dev-inprogress 2-dev-wip

My problem is that when i am in another branch and want to checkout 2-dev-wip by using tab-completion (as usual), it only completes 2-dev-, and gives me two options:

  • 2-dev-inprogress
  • 2-dev-wip

Anybody out there know some specific surgery to remove that 2-dev-inprogress branch from tab-completion history? Only thing I've tried so far is commenting out source ~/.git-completion.bash in my .bash_profile and restart iTerm, but no luck. I also snooped around the .git directory, but got scared thinking I would fudge something up beyond repair.


Do you still have a remote branch named 2-dev-inprogress? If so you have to remove this branch or prevent git-completion of remote branches by commenting out the remote checks in /etc/bash_completion.d/git