Somebody pushed a branch called test
with git push origin test
to a shared repository. I can see the branch with git branch -r
.
OK, the answer is easy... You basically see the branch, but you don't have a local copy yet!...
You need to fetch
the branch...
You can simply fetch and then checkout to the branch, use the one line command below to do that:
git fetch && git checkout test
I also created the image below for you to share the differences, look at how fetch
works and also how it's different to pull
: