I have a master
and a development
branch, both pushed to GitHub. I\'ve clone
d, pull
ed, and fetch
ed, but I re
OK, when you clone your repo, you have all branches there...
If you just do git branch
, they are kind of hidden...
So if you'd like to see all branches name, just simply add --all
flag like this:
git branch --all
or git branch -a
If you just checkout to the branch, you get all you need.
But how about if the branch created by someone else after you clone?
In this case, just do:
git fetch
and check all branches again...
If you like to fetch and checkout at the same time, you can do:
git fetch && git checkout your_branch_name
Also created the image below for you to simplify what I said: