How to pull down a remote branch from Github

You clone a repo that has a bunch of branches. But when you type $ git branch in the terminal you don’t see the branches.

So you type $ git branch -a in the terminal and now you see the remote branches but you can’t access them.

Let’s say one remote branch looks like this:

remotes/origin/pages

Then do this:

$ git checkout -b pages origin/pages

Then if you look inside using the terminal with $ ls, you should see all the files that were inside that branch.