search

Home  >  Q&A  >  body text

git branch -a cannot display all remote branches, only the remote master branch

I created a new git repository on my gitlab. My local code connected to the remote repository using git init and git remote master URL. Then I created a new init branch. Why am I in the local git branch at this time - When a, only the remote master branch can be displayed? As shown in the picture:

PHP中文网PHP中文网2771 days ago781

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