40. Remote branches
- To learn about local and remote branches
Let’s take a look at the branches in our cloned repository.
$ git branch * master
As we can see only the master branch is listed in it. Where is the style branch?
git branch only lists the local branches by default.
01 01 List of the remote branches
To see all the branches, try the following command:
git branch -a
$ git branch -a * master remotes/origin/HEAD -> origin/master remotes/origin/style remotes/origin/master
Git lists all the branches from the original repo, but the remote repository branches are not treated as local ones. If we need our own style branch, we need to create it on our own. In a minute you will see how it is done.