I have a repository on Github with 2 branches: master
and develop
.
When I clone the repository and run $ git branch
it shows only the master
branch.
If I run $ git branch -a
I can see all the remote branches.
Now, if I do a $ git checkout develop
, I get the message:
Branch develop set up to track remote branch develop from origin.
Switched to a new branch 'develop'
What actually happened? Were the commits from the remote develop
branch fetched when I ran $ git clone remote-url
, or when I ran: $ git checkout develop
, or neither?
Have I to do a $ git pull origin develop
after checking out develop
, or it's already done?
Please help me understand how clone
works when there are multiple branches on remote.