-1

When I do a git clone and then a git branch, only the master shows up. I only see the other branches from the remote when I do git branch -a.

Why are the other branches hidden?

  • Also, I think this duplicate would be worth keeping around (i.e. don't delete it please), because it uses different keywords and phrasing from the canonical question. –  May 30 '14 at 03:05

1 Answers1

0

Assuming you did a normal clone and didn't use --depth=1, they're not hidden, you just haven't made a local copy yet. To check out one of the other branches, just run:

git checkout <branchname>

It'll detect the remote branch and check out that version of the code locally.

Leigh
  • 12,038
  • 4
  • 28
  • 36