Git远程分支错误列出两次
如果我执行 gitbranch -a ,我会正确列出我的本地分支,但我的远程分支会列出两次...例如,
master
remotes/github/master
remotes/origin/master
我认为这样做的原因是我从一个名为github 映射到我的 github 存储库 URL,然后将其名称更改为 origin,仍然保留相同的 URL。
如果我执行 git remote -v ,我会得到正确的单个名称/url 列表:
origin [email protected]:username/Repo.git (fetch)
origin [email protected]:username/Repo.git (push)
我尝试在配置文件中完全删除远程 URL,以便 git remote 会返回什么都没有,但是 gitbranch -a 仍然返回那些双倍的远程分支。
我如何摆脱这种双重列表?
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 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 [email protected]:username/Repo.git (fetch)
origin [email protected]: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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试
try