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
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.