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
Use:
git checkout -b /
Other answers do not work with modern Git in my benign case. You might need to pull first if the remote branch is new, but I haven't checked that case.