How do I list all remote branches in Git 1.7+?

后端 未结 19 2296
轮回少年
轮回少年 2020-12-02 03:14

I\'ve tried git branch -r, but that only lists remote branches that I\'ve tracked locally. How do I find the list of those that I haven\'t? (It doesn\'t matter

19条回答
  •  误落风尘
    2020-12-02 04:04

    If there's a remote branch that you know should be listed, but it isn't getting listed, you might want to verify that your origin is set up properly with this:

    git remote show origin
    

    If that's all good, maybe you should run an update:

    git remote update
    

    Assuming that runs successfully, you should be able to do what the other answers say:

    git branch -r
    

提交回复
热议问题