Home  >  Q&A  >  body text

git branch -a无法全部显示远程的分支,只显示远程的master分支

我在我的gitlab上面新建了一个git仓库,我在本地的代码用git init,git remote master URL的形式连接了远程仓库,之后新建了init分支,为什么这时候我在本地git branch -a 的时候只能显示 远程的master分支?如图所示:

PHP中文网PHP中文网2727 days ago745

reply all(2)I'll reply

  • 滿天的星座

    滿天的星座2017-05-02 09:51:32

    git branch -a List local branches and remote branches;
    The remote branch here refers to the locally saved remote tracking branch;

    You can update the local remote tracking branch through get fetch to keep it consistent with the remote branch;

    reply
    0
  • 怪我咯

    怪我咯2017-05-02 09:51:32

    git pullWant to try it now?

    reply
    0
  • Cancelreply