George Edwards George Edwards - 1 year ago 107
Git Question

Git not displaying branches other than master

I have just cloned a repository which worked and all the files I am expecting to see from my master branch are there. However, the repository also has another branch,

. When I run
git branch
, it is not displayed, even after I run
git fetch --all
. In my repo in the cloud (Visual Studio Team Services, was Visual Studio Online) I can see it, just not locally. What do I need to do to check this branch out?

Answer Source

git branch only shows your local branches. Use git branch -a to show all branches. Your missing branch should be displayed then.

Use git checkout experimentto create a local from the remote branch and check it out. After that a simple git branchshould also show a local branch experiment

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download