I used git branch -d myBranch
to delete a branch. However, when I am on master and try to checkout a new branch with git checkout
, myBranch>
One possible reason for this is that, if a remote branch (e.g. origin/myBranch
) still exists, then git checkout myBranch
will succeed as an alternative to git checkout -b myBranch origin/myBranch
. This is intended as a convenience for the common case of checkout out a remote branch for the first time, creating an identically named local tracking branch.
There are other possibilities, too, depending on what exactly you are using for completion, but that's one of the first things I'd check. If you run git branch -a
, and there is an origin/myBranch
listed (or one for a remote other than origin
, if you have such), then that's a likely culprit.