Somebody pushed a branch called test with git push origin test to a shared repository. I can see the branch with git branch -r.
test
git push origin test
git branch -r
git checkout -b "Branch_name" [ B means Create local branch]
git branch --all
git checkout -b "Your Branch name"
git branch
successfully checkout from the master branch to dev branch