If I do a git branch -a
, I get my local branches listed correctly, but my remote branches are listed double... e.g.
master
remotes/github/master
remotes/origin/master
I think the reason for this is开发者_JAVA百科 that I started out with a remote called github mapped to my github repository URL and then later changed its name to origin, still keeping the same URL.
If I do a git remote -v
, I get the correct single name/url listing:
origin git@github.com:username/Repo.git (fetch)
origin git@github.com:username/Repo.git (push)
I tried removing the remote URL completely in the config file so that git remote
would return nothing, but git branch -a
still returned those doubled remote branches.
How do I get rid of this double listing?
try
git branch -d -r remotes/github/master
精彩评论