Git Hub Clone All Branches At Once

后端 未结 7 1080
时光取名叫无心
时光取名叫无心 2020-12-07 12:19

I\'m trying to clone an entire repository onto my machine using linux. I used

git clone    

I then went into the folder where i

7条回答
  •  庸人自扰
    2020-12-07 12:46

    It's only showing me master and not other branches which were in the remote repository. How do I clone all branches?

    Branches are essentially pointers to commits. When you do a git clone (or a git fetch), you retrieve all of the commits from the remote repository, and all of its branches as well.

    However, git branch does not show remote branches by default. Instead, it shows you your local branches, which may or may not have any relation to branches that exist on the remote. If you run git branch --all, git will report all of the branches it knows about, both local and remote.

    It's worth noting that tags do not operate this way, and there is no distinction between a local and remote tag.

提交回复
热议问题