I'm clearly missing something since I am unable to fetch the remote branch I need on the server from the git repo I've been working with locally.
On my local dev environment
I run git remote -v
and it gives me:
origin git@git.example.com:the_repo (fetch)
origin git@git.example.com:the_repo (push)
I run git branch
and it gives me:
* live
master
On my live server environment
I run git remote -v
and it gives me:
origin git@git.example.com:the_repo (fetch)
origin git@git.example.com:the_repo (push)
I run git branch
and it gives me:
* master
When I try to fix this situation by running git fetch
or git fetch origin
, I still do not see my live
branch upon running git branch
again. I suspect this is because git branch
only lists my local branches.
How can I fetch the repo's remote branches and list them before I check them out locally?
Many thanks - much appreciated.